News for hackers. Stuff that matters.
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.
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!
Re:PEP 435 Accepted – Adding an Enum type to the Python stan... by paul_odin on Friday May 10, 2013 @03:16PM (#5688127)
Right, PEP 3115. Indeed one of the reasons is that "there is an important body of use cases where it would be useful to preserve the order in which a class members are declared."

http://www.python.org/dev/peps/pep-3115/