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

2013年4月25日 11:50:38 -0700

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
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to