3 ms·
This is not a bug, it's the author failing to understand Python's syntax for chained comparisons: a is b is c is equivalent to (a is b) and (b is c) I u
by yorwba 6y ago
This is not a bug, it's the author failing to understand Python's syntax for chained comparisons:
a is b is c
is equivalent to
(a is b) and (b is c)
I use this syntax most often with a < b < c to check that all items are in the expected order.
- Mockapapella 6y agoThank you for the explanation, I really appreciate it. I've updated the article to more accurately reflect what goes on under the hood. Is there a way to edit submission titles? Or is that a moderator only thing?