Enums were added to Python in version 3.4 by PEP 435.
Creating an enum (Python 2.4 through 3.3)
Enums have been backported from Python 3.4 to Python 2.4 through Python 3.3. You can get this the enum34 backport from PyPI.
Creation of an enum is identical to how it works in Python 3.4+
Enums are iterable:
This modified text is an extract of the original Stack Overflow Documentation created by following contributors
and released under CC BY-SA 3.0