ID EN
Enum

global_enum

Python 3.11

A decorator to change the str() and repr() of an enum to show its members as belonging to the module instead of its class. Should only be used when the enum members are exported to the module global namespace (see re.RegexFlag for an example).

Syntax

PYTHON
@enum.global_enum

See Also

str() repr() re.RegexFlag