[issue23591] Add Flags and IntFlags
Vedran Čačić
report at bugs.python.org
Mon Aug 15 15:45:35 EDT 2016
Vedran Čačić added the comment:
So, in fact, your Flags are simply an overlayed namespace over int (the way to give some ints sticky names), and any int is accessible from any Flags, no matter whether it has a name or not? I must say that to me it seems radically different than (Int)Enum philosophy.
class MyIntEnum(IntEnum):
A = 1
>>> MyIntEnum(0)
ValueError: 0 is not a valid MyIntEnum
So, flags are not enums, nor they share the same principles (identity, exclusiveness). Why are they in the enum module at all?
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23591>
_______________________________________
More information about the Python-bugs-list
mailing list