OR and AND of EnumValues should be supported and return ints
Bug #1110501 reported by
Barry Warsaw
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
flufl.enum |
Won't Fix
|
Wishlist
|
Unassigned |
Bug Description
From python-ideas:
class Flags(Enum):
beautiful = 1
fast = 2
elegant = 4
wonderful = 8
>>> Flags.fast | Flags.elegant
6
Returning an int from such operations is the only sensible interpretation.
Changed in flufl.enum: | |
importance: | Undecided → Wishlist |
Changed in flufl.enum: | |
milestone: | none → 3.4 |
To post a comment you must log in.
from python-ideas
I prefer something like
>>> TypeFlag.HAS_GC | TypeFlag. INT_SUBCLASS HAS_GC| INT_SUBCLASS
TypeFlag.