Message253482
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. |
|
Date |
User |
Action |
Args |
2015-10-26 17:15:32 | ezio.melotti | set | recipients:
+ ezio.melotti, Sapphire Becker |
2015-10-26 17:15:31 | ezio.melotti | set | messageid: <1445879731.97.0.59699481746.issue25484@psf.upfronthosting.co.za> |
2015-10-26 17:15:31 | ezio.melotti | link | issue25484 messages |
2015-10-26 17:15:31 | ezio.melotti | create | |
|