[issue46703] boolean operation issue (True == False == False)
Eryk Sun
report at bugs.python.org
Wed Feb 9 21:03:08 EST 2022
Eryk Sun <eryksun at gmail.com> added the comment:
> True == False == False is really True == False and False == False
> wich is False and True which is False
Moreover, since the left-hand comparison is `True == False`, which evaluates to False, the right-hand comparison doesn't even get evaluated.
In the following example, print(3) doesn't get called because the left-hand comparison, `None != None`, is False:
>>> print(1) != print(2) == print(3)
1
2
False
----------
nosy: +eryksun
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46703>
_______________________________________
More information about the Python-bugs-list
mailing list