enum — Support for enumerations — Python 3.11.16 documentation

docs.python.org

Table of Contents | Report a Bug | index | modules | Python | 3.11.16 Documentation | The Python Standard Library | Data Types | reprlib — Alternate repr() implementation | graphlib — Functionality to operate with graph-l

Tin mới

reprlib — Alternate repr() implementation

graphlib — Functionality to operate with graph-like structures

Python Module Index

3.11.16 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.

Supported __dunder__ names¶

__members__ is a read-only ordered mapping of member_name:member items. It is only available on the class.

1 1