Message298634
Check out this section of the documentation, notably this part:
"Note that comparisons, membership tests, and identity tests, all have the same precedence and have a left-to-right chaining feature"
Chaining lets you write stuff like this:
>>> x = 1
>>> 0 < x < 2
True
And since membership tests and identity tests are chained, the code you posted above essentially turns into:
(1 in [1]) and ([1] is True)
The former part of that expression is True but the latter is false. |
|
Date |
User |
Action |
Args |
2017-07-19 05:34:31 | ammar2 | set | recipients:
+ ammar2, mcara |
2017-07-19 05:34:31 | ammar2 | set | messageid: <1500442471.68.0.0140043612978.issue30965@psf.upfronthosting.co.za> |
2017-07-19 05:34:31 | ammar2 | link | issue30965 messages |
2017-07-19 05:34:31 | ammar2 | create | |
|