mirror of
https://github.com/python/cpython.git
synced 2025-08-12 12:58:50 +00:00
[3.12] GH-111182: Update EnumType.__contains__ docs (GH-111184) (GH-111281)
GH-111182: Update EnumType.__contains__ docs (GH-111184)
(cherry picked from commit c0ea67dd0d
)
Co-authored-by: InSync <122007197+InSyncWithFoo@users.noreply.github.com>
This commit is contained in:
parent
b6e508cc86
commit
2a28aa10a8
1 changed files with 4 additions and 3 deletions
|
@ -198,11 +198,12 @@ Data Types
|
||||||
>>> some_var = Color.RED
|
>>> some_var = Color.RED
|
||||||
>>> some_var in Color
|
>>> some_var in Color
|
||||||
True
|
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
|
Before Python 3.12, a ``TypeError`` is raised if a
|
||||||
just members; until then, a ``TypeError`` will be raised if a
|
|
||||||
non-Enum-member is used in a containment check.
|
non-Enum-member is used in a containment check.
|
||||||
|
|
||||||
.. method:: EnumType.__dir__(cls)
|
.. method:: EnumType.__dir__(cls)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue