[issue41517] Enum multiple inheritance loophole

2020-08-10 Thread Jeffrey Kintscher
Change by Jeffrey Kintscher : -- nosy: +Jeffrey.Kintscher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue41517] Enum multiple inheritance loophole

2020-08-10 Thread Tal Suhareanu
Tal Suhareanu added the comment: Ethan Furman bullseye! thanks for clarifying -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue41517] Enum multiple inheritance loophole

2020-08-10 Thread Ethan Furman
Ethan Furman added the comment: The problem is that class B should raise an error as class A already has members. -- ___ Python tracker ___ __

[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 loophole. my example

[issue41517] Enum multiple inheritance loophole

2020-08-10 Thread Eric V. Smith
Eric V. Smith added the comment: With Python 3.7.4, which is all I have handy, that code does not give a runtime error. It prints "B.b". Your text says code "when creating a multiple inheritance like the following, it works". It sounds like you know the code sample works. So I don't understa

[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 ___ ___ Python-bugs-list mailing lis

[issue41517] Enum multiple inheritance loophole

2020-08-10 Thread Eric V. Smith
Eric V. Smith added the comment: Could you provide code which demonstrates the problem? -- nosy: +eric.smith ___ Python tracker ___ ___

[issue41517] Enum multiple inheritance loophole

2020-08-10 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +barry, eli.bendersky, ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailin

[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(Int