[Python-ideas] PEP for enum library type?

Joao S. O. Bueno jsbueno at python.org.br
Wed Feb 13 04:41:12 CET 2013


On 12 February 2013 19:29, Guido van Rossum <guido at python.org> wrote:
> Please. Anything *except*
>
> class Color(Enum):
>   RED, BLUE, GREEN
>
> And not this eiter:
>
> class Color(Enum):
>   RED
>   BLUE
>   GREEN

Just throwing in another syntax that is valid, requires no quotes and
no magic - in case someone
is interested in developing on it:

>>> Colors = make(RED=..., GREEN=..., BLUE=...)



More information about the Python-ideas mailing list