A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2013-May/125791.html below:

[Python-Dev] PEP-435 reference implementation

[Python-Dev] PEP-435 reference implementation [Python-Dev] PEP-435 reference implementationBarry 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 "<stdin>", line 1, in <module>
>   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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4