This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ethan.furman
Recipients barry, eli.bendersky, ethan.furman, kamilturek, suhailsingh247
Date 2021-04-21.12:15:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1619007357.34.0.75940452606.issue43430@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-04-21 12:15:57ethan.furmansetrecipients: + ethan.furman, barry, eli.bendersky, kamilturek, suhailsingh247
2021-04-21 12:15:57ethan.furmansetmessageid: <1619007357.34.0.75940452606.issue43430@roundup.psfhosted.org>
2021-04-21 12:15:57ethan.furmanlinkissue43430 messages
2021-04-21 12:15:57ethan.furmancreate