[issue33219] x in IntFlag() should test int x's inclusion in IntFlag

Ethan Furman report at bugs.python.org
Wed Apr 4 19:14:49 EDT 2018


Ethan Furman <ethan at stoneleaf.us> added the comment:

Nitish, Flag can check if the current Flag class has a mixin, and if so if the object being checked for is of that same type.

Dutcho, my apologies.  Looks like I did not fully understand how __contains__ is supposed to work and a TypeError is completely appropriate.

Looking into deprecation cycles now to get the change scheduled.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33219>
_______________________________________


More information about the Python-bugs-list mailing list