[issue38250] enum.Flag should be more set-like
Ethan Furman
report at bugs.python.org
Mon Jan 25 18:01:15 EST 2021
Ethan Furman <ethan at stoneleaf.us> added the comment:
Thank you to everyone involved. :-)
To answer the first three points that started this issue:
1. iteration -> each single-bit flag in the entire flag, or a
combinations of flags, is returned one at a time -- not the
empty set, not other multi-bit values
2. length is implemented -> `len(Color.BLUE | Color.RED) == 2`
3. subset is implemented as containment checking:
`Color.BLUE in (Color.RED | Color.BLUE) is True`
----------
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38250>
_______________________________________
More information about the Python-bugs-list
mailing list