Ethan Furman <[email protected]> added the comment:
Problem: What to do when the Flag has compound members?
class Color(Flag):
BLACK = 0
RED = 1
GREEN = 2
BLUE = 4
PURPLE = RED|BLUE
WHITE = RED|GREEN|BLUE
I think the answer is: only return the single members. So
--> list(Color.WHITE)
[Color.BLUE, Color.GREEN, Color.RED]
----------
resolution: fixed ->
stage: resolved -> needs patch
status: closed -> open
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue32218>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com