Message362622
Orion, you're using the interface as intended :-)
While it's too late to change now, if Python started over from scratch I'd argue to leave "in" and "not in" out of this feature - chaining them is _usually_ an unintended behavior.
Then again, sometimes it is slightly useful. For example, if I want to know if `n` is in a set of primes, but isn't even,
if 2 != n in some_set_of_primes:
does the job succinctly. But not really "Pythonically", since even experienced Python programmers may scratch their heads when reading it :-( |
|
Date |
User |
Action |
Args |
2020-02-25 03:53:43 | tim.peters | set | recipients:
+ tim.peters, eryksun, Orion Fisher |
2020-02-25 03:53:43 | tim.peters | set | messageid: <1582602823.25.0.59753250479.issue39746@roundup.psfhosted.org> |
2020-02-25 03:53:43 | tim.peters | link | issue39746 messages |
2020-02-25 03:53:43 | tim.peters | create | |
|