mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
bpo-45740: [Enum] add versionadded markers to docs (GH-29443)
[Enum] add versionadded markers to docs
This commit is contained in:
parent
815dad42d5
commit
cb755dba7a
2 changed files with 7 additions and 7 deletions
|
|
@ -636,7 +636,7 @@ an incorrect member::
|
||||||
Before :class:`StrEnum`, ``Directions.NORTH`` would have been the :class:`tuple`
|
Before :class:`StrEnum`, ``Directions.NORTH`` would have been the :class:`tuple`
|
||||||
``('north',)``.
|
``('north',)``.
|
||||||
|
|
||||||
.. versionadded:: 3.10
|
.. versionadded:: 3.11
|
||||||
|
|
||||||
|
|
||||||
IntFlag
|
IntFlag
|
||||||
|
|
@ -659,7 +659,7 @@ used.
|
||||||
details.
|
details.
|
||||||
|
|
||||||
.. versionadded:: 3.6
|
.. versionadded:: 3.6
|
||||||
.. versionchanged:: 3.10
|
.. versionchanged:: 3.11
|
||||||
|
|
||||||
Sample :class:`IntFlag` class::
|
Sample :class:`IntFlag` class::
|
||||||
|
|
||||||
|
|
@ -696,7 +696,7 @@ It is also possible to name the combinations::
|
||||||
Named combinations are considered aliases. Aliases do not show up during
|
Named combinations are considered aliases. Aliases do not show up during
|
||||||
iteration, but can be returned from by-value lookups.
|
iteration, but can be returned from by-value lookups.
|
||||||
|
|
||||||
.. versionchanged:: 3.10
|
.. versionchanged:: 3.11
|
||||||
|
|
||||||
Another important difference between :class:`IntFlag` and :class:`Enum` is that
|
Another important difference between :class:`IntFlag` and :class:`Enum` is that
|
||||||
if no flags are set (the value is 0), its boolean evaluation is :data:`False`::
|
if no flags are set (the value is 0), its boolean evaluation is :data:`False`::
|
||||||
|
|
@ -728,7 +728,7 @@ be combined with them (but may lose :class:`IntFlag` membership::
|
||||||
>>> list(RW)
|
>>> list(RW)
|
||||||
[Perm.R, Perm.W]
|
[Perm.R, Perm.W]
|
||||||
|
|
||||||
.. versionadded:: 3.10
|
.. versionadded:: 3.11
|
||||||
|
|
||||||
|
|
||||||
Flag
|
Flag
|
||||||
|
|
@ -789,7 +789,7 @@ value::
|
||||||
>>> list(purple)
|
>>> list(purple)
|
||||||
[Color.RED, Color.BLUE]
|
[Color.RED, Color.BLUE]
|
||||||
|
|
||||||
.. versionadded:: 3.10
|
.. versionadded:: 3.11
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
|
|
@ -939,7 +939,7 @@ _Private__names
|
||||||
:ref:`Private names <private-name-mangling>` are not converted to enum members,
|
:ref:`Private names <private-name-mangling>` are not converted to enum members,
|
||||||
but remain normal attributes.
|
but remain normal attributes.
|
||||||
|
|
||||||
.. versionchanged:: 3.10
|
.. versionchanged:: 3.11
|
||||||
|
|
||||||
|
|
||||||
``Enum`` member type
|
``Enum`` member type
|
||||||
|
|
@ -962,7 +962,6 @@ it will raise a :exc:`DeprecationWarning`::
|
||||||
<FieldTypes.size: 2>
|
<FieldTypes.size: 2>
|
||||||
|
|
||||||
.. versionchanged:: 3.5
|
.. versionchanged:: 3.5
|
||||||
.. versionchanged:: 3.10
|
|
||||||
|
|
||||||
|
|
||||||
Creating members that are mixed with other data types
|
Creating members that are mixed with other data types
|
||||||
|
|
|
||||||
|
|
@ -397,6 +397,7 @@ Data Types
|
||||||
Using :class:`auto` with :class:`StrEnum` results in values of the member name,
|
Using :class:`auto` with :class:`StrEnum` results in values of the member name,
|
||||||
lower-cased.
|
lower-cased.
|
||||||
|
|
||||||
|
.. versionadded:: 3.11
|
||||||
|
|
||||||
.. class:: Flag
|
.. class:: Flag
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue