]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-111182: Update EnumType.__contains__ docs (GH-111184)
authorInSync <122007197+InSyncWithFoo@users.noreply.github.com>
Tue, 24 Oct 2023 17:30:13 +0000 (00:30 +0700)
committerGitHub <noreply@github.com>
Tue, 24 Oct 2023 17:30:13 +0000 (10:30 -0700)
Doc/library/enum.rst

index d5f46ed58e8d2460080bca93b19357c2e408f36e..d9e08fc89652c7a6d42fd8e5ed209624bc3b2944 100644 (file)
@@ -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)