Skip to content

Commit

Permalink
GH-111182: Update EnumType.__contains__ docs (GH-111184)
Browse files Browse the repository at this point in the history
  • Loading branch information
InSyncWithFoo authored Oct 24, 2023
1 parent 46407fe commit c0ea67d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Doc/library/enum.rst
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,12 @@ Data Types
>>> some_var = Color.RED
>>> some_var in Color
True
>>> Color.RED.value in Color
True

.. note::
.. versionchanged:: 3.12

In Python 3.12 it will be possible to check for member values and not
just members; until then, a ``TypeError`` will be raised if a
Before Python 3.12, a ``TypeError`` is raised if a
non-Enum-member is used in a containment check.

.. method:: EnumType.__dir__(cls)
Expand Down

0 comments on commit c0ea67d

Please sign in to comment.