[Python-ideas] PEP for enum library type?

Jan Kaliszewski zuo at chopin.edu.pl
Thu Feb 14 01:46:05 CET 2013


13.02.2013 08:38, Antoine Pitrou wrote:

> It would still be shorter to type something like:
>
> class Color(Enum):
>     values = ('RED', 'GREEN', 'BLUE', 'MAGENTA', 'FLUFL')

Or even in a namedtuple-like manner:

     class Color(Enum):
         values = 'RED, GREEN, BLUE, MAGENTA, FLUFL'

Cheers.
*j




More information about the Python-ideas mailing list