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 tim.peters
Recipients Orion Fisher, eryksun, tim.peters
Date 2020-02-25.03:53:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1582602823.25.0.59753250479.issue39746@roundup.psfhosted.org>
In-reply-to
Content
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 :-(
History
Date User Action Args
2020-02-25 03:53:43tim.peterssetrecipients: + tim.peters, eryksun, Orion Fisher
2020-02-25 03:53:43tim.peterssetmessageid: <1582602823.25.0.59753250479.issue39746@roundup.psfhosted.org>
2020-02-25 03:53:43tim.peterslinkissue39746 messages
2020-02-25 03:53:43tim.peterscreate