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/126037.html below:

[Python-Dev] PEP 435: initial values must be specified? Yes

[Python-Dev] PEP 435: initial values must be specified? YesEthan Furman ethan at stoneleaf.us
Mon May 6 02:44:42 CEST 2013
On 05/05/2013 04:57 PM, Greg Ewing wrote:
> Ethan Furman wrote:
>> --> class Color(Enum):
>> ...     red, green, blue
>> ...
>>
>> --> class MoreColor(Color):
>> ...     red, orange, yellow
>> ...
>>
>> --> type(MoreColor.red) is MoreColor
>> False
>
> This argument no longer applies, since we're not
> allowing enums to be extended.

Actually, it does:

--> class Color(Enum):
...    black, red, green, blue, cyan, magenta, yellow, black # oops!

--
~Ethan~
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