enum_tools.custom_enums
Custom subclasses of enum.Enum
and enum.Flag
.
Classes:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-
enum
AutoNumberEnum
(value)[source] Bases:
enum.Enum
Enum
that automatically assigns increasing values to members.
-
enum
DuplicateFreeEnum
(value)[source] Bases:
enum.Enum
Enum
that disallows duplicated member names.
-
flag
IterableFlag
(value)[source] Bases:
enum.Flag
Flag
with support for iterating over members and member combinations.This functionality was added to Python 3.10’s
enum
module in python/cpython#22221.New in version 0.5.0.
The
Flag
and its members have the following methods:
-
flag
IterableIntFlag
(value)[source] Bases:
enum.IntFlag
IntFlag
with support for iterating over members and member combinations.This functionality was added to Python 3.10’s
enum
module in python/cpython#22221.New in version 0.5.0.
- Member Type
The
Flag
and its members have the following methods:
-
enum
MemberDirEnum
(value)[source] Bases:
enum.Enum
Enum
which includes attributes as well as methods.This will be part of the
enum
module starting with Python 3.10.See also
Pull request python/cpython#19219 by Angelin BOOZ, which added this to CPython.
New in version 0.6.0.