mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-93910: [Enum] remove member.member deprecation (GH-103236)
i.e. Color.RED.BLUE is now officially supported.
This commit is contained in:
parent
b4978ff872
commit
4ec8dd10bd
4 changed files with 37 additions and 50 deletions
|
@ -988,12 +988,11 @@ but remain normal attributes.
|
|||
""""""""""""""""""""
|
||||
|
||||
Enum members are instances of their enum class, and are normally accessed as
|
||||
``EnumClass.member``. In Python versions starting with ``3.5`` you could access
|
||||
members from other members -- this practice is discouraged, is deprecated
|
||||
in ``3.12``, and will be removed in ``3.14``.
|
||||
``EnumClass.member``. In certain situations, such as writing custom enum
|
||||
behavior, being able to access one member directly from another is useful,
|
||||
and is supported.
|
||||
|
||||
.. versionchanged:: 3.5
|
||||
.. versionchanged:: 3.12
|
||||
|
||||
|
||||
Creating members that are mixed with other data types
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue