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 wim.glenn
Recipients docs@python, wim.glenn
Date 2015-04-17.07:22:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The comparisons section of the python 2 docs says:


For the list and tuple types, x in y is true if and only if there exists an index i such that x == y[i] is true.


But it's not strictly speaking correct.  Simplest counter-example:

x = float('nan')
y = [x]

The python 3 docs instead mention correct equivalent which is 

any(x is e or x == e for e in y)
Date User Action Args
2015-04-17 07:22:58wim.glennsetrecipients: + wim.glenn, docs@python
2015-04-17 07:22:58wim.glennsetmessageid: <>
2015-04-17 07:22:58wim.glennlinkissue23986 messages
2015-04-17 07:22:57wim.glenncreate