[Python-ideas] Enums

Stefan Behnel stefan_ml at behnel.de
Mon Jul 25 08:04:45 CEST 2011


Ben Finney, 25.07.2011 04:09:
> Guido van Rossum writes:
>>> For enums, I think we should just pick a solution. I'm in favor of
>> Barry Warsaw's version, flufl.enum.
>> As the maintainer of the PyPI ‘enum’ package, I also support the FLUFL's
> ‘flufl.enum’ to be the One Obvious Way.

Never used enums in Python, and likely won't do so anywhere in the near 
future, but I just read through the usage page at
http://packages.python.org/flufl.enum/docs/using.html
and *if* such a library gets added to the stdlib, then this is the way it 
should work. The examples totally make sense to me.
Stefan


More information about the Python-ideas mailing list

AltStyle によって変換されたページ (->オリジナル) /