Re:PEP 435 Accepted – Adding an Enum type to the Python stan...
by eliben on Friday May 10, 2013 @02:57PM
(#5688006)
It's possible by using a __prepare__ method in the metaclass of Enum, which allows to return an essentially ordered dict for the __dict__ of enumeration classes.
[ Parent
| on HN ]
Re:PEP 435 Accepted – Adding an Enum type to the Python stan...
by marmaduke on Friday May 10, 2013 @03:11PM
(#5688085)
I guess this is new to Py 3k? Thanks for the tip!