[issue33217] x in enum.Flag() is True when x is no Flag
Ethan Furman
report at bugs.python.org
Tue Apr 3 20:29:55 EDT 2018
Ethan Furman <ethan at stoneleaf.us> added the comment:
Strings are actually the odd-man out -- dicts, sets, lists, tuples, etc., all return False instead of raising TypeError.
The reason str raises an error is because `in`, for str, is a substring check, not a membership check.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33217>
_______________________________________
More information about the Python-bugs-list
mailing list