Skip to content

Commit c0ea67d

Browse files
GH-111182: Update EnumType.__contains__ docs (GH-111184)
1 parent 46407fe commit c0ea67d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Doc/library/enum.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,12 @@ Data Types
198198
>>> some_var = Color.RED
199199
>>> some_var in Color
200200
True
201+
>>> Color.RED.value in Color
202+
True
201203

202-
.. note::
204+
.. versionchanged:: 3.12
203205

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

208209
.. method:: EnumType.__dir__(cls)

0 commit comments

Comments
 (0)