🔵 🔵 🔵


Primary

၊၊||၊|။

Enum.value ⚬|Documentation|1st|20251021000108-00-⌔

enum — Support for enumerations — Python 3 documentation#enum.Enum.value

value

The value given to the Enum member:

>>> Color.RED.value
1

Value of the member, can be set in __new__().

Note: Enum member values

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.

While mutable/unhashable values, such as dict, list or a mutable dataclass, can be used, they will have a quadratic performance impact during creation relative to the total number of mutable/unhashable values in the enum.

Printed 2026-06-28.

(echo:: @ )

Link to original

Secondary

• • •