Tal Suhareanu <tals...@gmail.com> added the comment:

sorry, I'll explain. by "when inheriting an implemented enum, we get a runtime 
error" I refer to this 
https://docs.python.org/3/library/enum.html#restricted-enum-subclassing

You shouldn't be able to subclass an enum, yet I just showed a loophole. my 
example code shows you can subclass an enum by using a trick, multiple 
inheritance.

I hope it's more clear now :)

btw it also works with regular Enum inheritance (I just used IntEnum for 
simplicity)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41517>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to