Ethan Furman <et...@stoneleaf.us> added the comment: issue33217 is tracking member-containment checks; modifying this one to track class-containment checks.
Given class Color(Enum): RED = 1 class Fruit(Enum): APPLE = 1 then --> Fruit.APPLE in Color False --> Fruit.APPLE in Fruit True --> 1 in Fruit TypeError The last is currently returning False instead of raising a TypeError. ---------- stage: -> needs patch title: x in IntFlag() should test int x's inclusion in IntFlag -> x in IntFlag should test raise TypeError if x is not an IntFlag type: enhancement -> behavior versions: +Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33219> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com