index modules | next | previous | Python » 3.8.5 Documentation » The Python Standard Library » Data Types » | enum ¶ New in version 3.4. Source code: Lib/enum.py An enumeration is a set of symbolic names (members) bound to unique, constant values. Within an enumeration, the members can be compared by identity, and the enumeration itself can be iterated over. ¶ This module defines four enumeration classes that can be used to define unique sets of names and values: Enum , IntEnum , Flag , and IntFlag . It also defines one decorator, unique() , and one helper, auto . class enum. Enum ¶ Base class for creating enumerated constants. See section Functional API for an alternate construction syntax. class enum. IntEnum ¶ Base class for creating enumerated constants that are also subclasses of int . class enum. IntFlag ¶ Base class for creating...