diff options
author | InSync <122007197+InSyncWithFoo@users.noreply.github.com> | 2023-10-24 17:30:13 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-24 17:30:13 (GMT) |
commit | c0ea67dd0d67a8ac59c61c777eae26288d3ac0f6 (patch) | |
tree | dacbc7b15267ad79bd30b228e35d3cf4122bbbbf /Doc/library | |
parent | 46407fe79ca78051cbf6c80e8b8e70a228f9fa50 (diff) | |
download | cpython-c0ea67dd0d67a8ac59c61c777eae26288d3ac0f6.zip cpython-c0ea67dd0d67a8ac59c61c777eae26288d3ac0f6.tar.gz cpython-c0ea67dd0d67a8ac59c61c777eae26288d3ac0f6.tar.bz2 |
GH-111182: Update EnumType.__contains__ docs (GH-111184)
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/enum.rst | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst index d5f46ed..d9e08fc 100644 --- a/Doc/library/enum.rst +++ b/Doc/library/enum.rst @@ -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) |