Ethan Furman <[email protected]> added the comment:
That sounds more like the way it is intended to be used: make you base enum
with all the changes you want, then use that base enum either by inheriting
from it or as a function call:
class MyBaseEnum(Enum, metaclass=...):
... custom stuff ...
... custom stuff ...
class MyRealEnum1(MyBaseEnum):
NAME = value
NAME = value
MyRealEnum2 = MyBaseEnum("MyRealEnum2", [('NAME', value), ('NAME', value)])
What change did you need with `__getitem__`? Maybe there is a way to
accomplish that goal without subclassing EnumMeta.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue43430>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com