[issue41517] Enum multiple inheritance loophole

2020-08-10 Thread Tal Suhareanu
Tal Suhareanu added the comment: Ethan Furman bullseye! thanks for clarifying -- ___ Python tracker <https://bugs.python.org/issue41517> ___ ___ Python-bug

[issue41517] Enum multiple inheritance loophole

2020-08-10 Thread Tal Suhareanu
Tal Suhareanu 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 l

[issue41517] Enum multiple inheritance loophole

2020-08-10 Thread Tal Suhareanu
Tal Suhareanu added the comment: Eric V. Smith it's in the first comment -- ___ Python tracker <https://bugs.python.org/issue41517> ___ ___ Python-bugs-l

[issue41517] Enum multiple inheritance loophole

2020-08-10 Thread Tal Suhareanu
New submission from Tal Suhareanu : when inheriting an implemented enum, we get a runtime error But when creating a multiple inheritance like the following, it works… so something feels broken in the enum mechanism from enum import IntEnum, Enum class A