Skip to content

bpo-45740: [Enum] docs add version #29443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Doc/howto/enum.rst
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ an incorrect member::
Before :class:`StrEnum`, ``Directions.NORTH`` would have been the :class:`tuple`
``('north',)``.

.. versionadded:: 3.10
.. versionadded:: 3.11


IntFlag
Expand All @@ -659,7 +659,7 @@ used.
details.

.. versionadded:: 3.6
.. versionchanged:: 3.10
.. versionchanged:: 3.11

Sample :class:`IntFlag` class::

Expand Down Expand Up @@ -696,7 +696,7 @@ It is also possible to name the combinations::
Named combinations are considered aliases. Aliases do not show up during
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
if no flags are set (the value is 0), its boolean evaluation is :data:`False`::
Expand Down Expand Up @@ -728,7 +728,7 @@ be combined with them (but may lose :class:`IntFlag` membership::
>>> list(RW)
[Perm.R, Perm.W]

.. versionadded:: 3.10
.. versionadded:: 3.11


Flag
Expand Down Expand Up @@ -789,7 +789,7 @@ value::
>>> list(purple)
[Color.RED, Color.BLUE]

.. versionadded:: 3.10
.. versionadded:: 3.11

.. note::

Expand Down Expand Up @@ -936,9 +936,10 @@ and raise an error if the two do not match::
_Private__names
"""""""""""""""

Private names are not converted to enum members, but remain normal attributes.
:ref:`Private names <private-name-mangling>` are not converted to enum members,
but remain normal attributes.

.. versionchanged:: 3.10
.. versionchanged:: 3.11


``Enum`` member type
Expand All @@ -961,7 +962,6 @@ it will raise a :exc:`DeprecationWarning`::
<FieldTypes.size: 2>

.. versionchanged:: 3.5
.. versionchanged:: 3.10


Creating members that are mixed with other data types
Expand Down
1 change: 1 addition & 0 deletions Doc/library/enum.rst
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ Data Types
Using :class:`auto` with :class:`StrEnum` results in values of the member name,
lower-cased.

.. versionadded:: 3.11

.. class:: Flag

Expand Down