PyDocs

Data Types

enum

An enumeration:
Symbols in enum

a

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

b

bin
Like built-in bin(), except negative values are represented in twos-complement, and the leading bit always indicates sign (0=positive, 1=negative).

e

Enum
Create a collection of name/value pairs.
EnumCheck
various conditions to check an enumeration for
EnumDict
Track enum member order and ensure member names are not reused.
EnumType
Metaclass for Enum

f

Flag
Support for flags
FlagBoundary
control how out of range values are handled "strict" -> error is raised [default for Flag] "conform" -> extra bits are discarded "eject" -> lose flag status "keep" -> keep flag status and all bits [d…

g

global_enum
decorator that makes the repr() of an enum member reference its module instead of its class; also exports all members to the enum's module's global namespace

i

IntEnum
Enum where members are also (and must be) ints
IntFlag
Support for integer-based Flags

m

member
Forces item to become an Enum member during class creation.

n

nonmember
Protects item from becoming an Enum member during class creation.

p

property
This is a descriptor, used to define attributes that act differently when accessed through an enum member and through an enum class.

r

ReprEnum
Only changes the repr(), leaving str() and format() to the mixed-in type.

s

show_flag_values
Return a list of all power-of-two integers contained in a flag value.
StrEnum
Enum where members are also (and must be) strings

u

unique
Class decorator for enumerations ensuring unique member values.

v

verify
Check an enumeration for various constraints.