enum

class enum.EnumMeta[source]

Bases: type

Metaclass for Enum

class enum.Enum[source]

Bases: object

Generic enumeration.

Derive from this class to define new enumerations.

name

The name of the Enum member.

value

The value of the Enum member.

class enum.IntEnum[source]

Bases: int, enum.Enum

Enum where members are also (and must be) ints

class enum.Flag[source]

Bases: enum.Enum

Support for flags

class enum.IntFlag[source]

Bases: int, enum.Flag

Support for integer-based Flags

class enum.auto[source]

Bases: object

Instances are replaced with an appropriate value in Enum class suites.

value = <object object>
enum.unique(enumeration)[source]

Class decorator for enumerations ensuring unique member values.