[Python-Dev] PEP 435 -- Adding an Enum type to the Python standard library (original) (raw)
Guido van Rossum guido at python.org
Sat Apr 27 23:57:11 CEST 2013
- Previous message: [Python-Dev] PEP 435 -- Adding an Enum type to the Python standard library
- Next message: [Python-Dev] PEP 435 -- Adding an Enum type to the Python standard library
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sat, Apr 27, 2013 at 1:01 PM, Ethan Furman <ethan at stoneleaf.us> wrote:
It seems to me that the most common case will be a simple name mapping, in which case one can do:
Planet = Enum.make('Planet', 'MERCURY VENUS EARTH') and be done with it.
That looks horrible.
-- --Guido van Rossum (python.org/~guido)
- Previous message: [Python-Dev] PEP 435 -- Adding an Enum type to the Python standard library
- Next message: [Python-Dev] PEP 435 -- Adding an Enum type to the Python standard library
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]