[issue43430] Exception raised when attempting to create Enum via functional API

2021-04-21 Thread Suhail S.
Suhail S. added the comment: In my usecase, I wanted to override the behaviour of __getitem__. I was able to accomplish this by subclassing EnumMeta. Having done so, I was able to work around this bug as follows. Instead of trying to access the functional API via Enum (using an enum

[issue43430] Exception raised when attempting to create Enum via functional API

2021-03-07 Thread Suhail S.
Change by Suhail S. : -- nosy: +barry, eli.bendersky, ethan.furman ___ Python tracker <https://bugs.python.org/issue43430> ___ ___ Python-bugs-list mailin

[issue43430] Exception raised when attempting to create Enum via functional API

2021-03-07 Thread Suhail S.
New submission from Suhail S. : It is possible to create custom Enum classes with a metaclass that is a subtype of EnumMeta. It is also possible to inherit from such an enumeration to create another enumeration. However, attempting to do so via the functional API raises an exception. See