This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ezio.melotti
Recipients Sapphire Becker, ezio.melotti
Date 2015-10-26.17:15:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1445879731.97.0.59699481746.issue25484@psf.upfronthosting.co.za>
In-reply-to
Content
https://docs.python.org/3/reference/expressions.html#comparisons says that "a op1 b op2 c ... y opN z is equivalent to a op1 b and b op2 c and ... y opN z" and this explains the "unexpected" result:

>>> 1 in [1] == True
False
>>> 1 in [1] and [1] == True
False

"in" and "not in" are also listed among the comparison operators, so I think this behavior is expected and by design.  I don't think there's anything that needs to be fixed here.
History
Date User Action Args
2015-10-26 17:15:32ezio.melottisetrecipients: + ezio.melotti, Sapphire Becker
2015-10-26 17:15:31ezio.melottisetmessageid: <1445879731.97.0.59699481746.issue25484@psf.upfronthosting.co.za>
2015-10-26 17:15:31ezio.melottilinkissue25484 messages
2015-10-26 17:15:31ezio.melotticreate