Because in fact that’s a chained comparison, so
True == False is False
is equivalent to
(True == False) and (False is False)
This can be surprising in this case, but lets you write 1 <= x < 4
unlike in other languages like C.
Because in fact that’s a chained comparison, so
True == False is False
is equivalent to
(True == False) and (False is False)
This can be surprising in this case, but lets you write 1 <= x < 4
unlike in other languages like C.