Message391514
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. |
|
Date |
User |
Action |
Args |
2021-04-21 12:15:57 | ethan.furman | set | recipients:
+ ethan.furman, barry, eli.bendersky, kamilturek, suhailsingh247 |
2021-04-21 12:15:57 | ethan.furman | set | messageid: <1619007357.34.0.75940452606.issue43430@roundup.psfhosted.org> |
2021-04-21 12:15:57 | ethan.furman | link | issue43430 messages |
2021-04-21 12:15:57 | ethan.furman | create | |
|