Message241317
The comparisons section of the python 2 docs says:
---
https://docs.python.org/2/reference/expressions.html#comparisons
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:58 | wim.glenn | set | recipients:
+ wim.glenn, docs@python |
2015-04-17 07:22:58 | wim.glenn | set | messageid: <1429255378.08.0.140067438597.issue23986@psf.upfronthosting.co.za> |
2015-04-17 07:22:58 | wim.glenn | link | issue23986 messages |
2015-04-17 07:22:57 | wim.glenn | create | |
|