enum — Support for enumerations — Python 3.16.0a0 documentation

docs.python.org

Tin mới

reprlib — Alternate repr() implementation

graphlib — Functionality to operate with graph-like structures

Python Module Index

3.16.0a0 Documentation

The Python Standard Library

How are Enums different?

This page contains the API reference information. For tutorial information and discussion of more advanced topics, see

dataclasses.dataclass

Member values can be anything: int, str, etc. If the exact value is unimportant you may use auto instances and an appropriate value will be chosen for you. See auto for the details.

Preparing the class namespace

EnumDict is a subclass of dict that is used as the namespace for defining enum classes (see Preparing the class namespace). It is exposed to allow subclasses of EnumType with advanced behavior like having multiple values

collections.abc.MutableMapping

EnumDict is a subclass of dict that is used as the namespace for defining enum classes (see Preparing the class namespace). It is exposed to allow subclasses of EnumType with advanced behavior like having multiple values