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

[Python-Dev] PEP 435 -- Adding an Enum type to the Python standard library

[Python-Dev] PEP 435 -- Adding an Enum type to the Python standard library [Python-Dev] PEP 435 -- Adding an Enum type to the Python standard libraryBarry Warsaw barry at python.org
Thu Apr 25 20:48:09 CEST 2013
On Apr 23, 2013, at 01:20 PM, Philip Jenvey wrote:

>Furthermore, you could define methods/fields on enum values, like Java's
>enums.

There's no reason why you couldn't do this now, even with the class
separation.  I've documented the customization protocol, so just add these
methods to the class you set in __value_factory__.

No need to conflate the classes, which I think just adds unnecessary
complexity and confusion.

-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