[Python-Dev] PEP-435 reference implementation (original) (raw)

Barry Warsaw barry at python.org
Wed May 1 07:41:02 CEST 2013


On Apr 30, 2013, at 09:19 PM, Ethan Furman wrote:

Subclassing an implemented Enum class now raises an error (is there a better word than 'implemented'?)

--> class MoreColor(Color): ... cyan = 4 ... magenta = 5 ... yellow = 6 Traceback (most recent call last): File "", line 1, in File "./ref435.py", line 83, in new raise EnumError("cannot subclass an implemented Enum class") ref435.EnumError: cannot subclass an implemented Enum class

What does it break if you remove the if base._enum check? I mean, can we be consenting adults here or not?

-Barry



More information about the Python-Dev mailing list