[Python-ideas] PEP for enum library type?
Barry Warsaw
barry at python.org
Wed Feb 13 19:05:17 CET 2013
On Feb 13, 2013, at 12:59 AM, Georg Brandl wrote:
>>> >>> from flufl.enum import make
>>> >>> make('Colors', 'RED GREEN BLUE'.split())
>>> <Colors {RED: 1, GREEN: 2, BLUE: 3}>
>And like namedtuple, it's ugly as hell :)
Suggestions for a better repr are welcome. ;)
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130213/249e9796/attachment.pgp>
More information about the Python-ideas
mailing list