[Python-Dev] PEP 435 -- Adding an Enum type to the Python standard library
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
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.
More information about the Python-Dev