mirror of
https://github.com/python/cpython.git
synced 2025-09-28 19:25:27 +00:00
[Enum docs]: fix order of arguments to isinstance() (GH-98542)
(cherry picked from commit 327fc1c6fa
)
Co-authored-by: Clément Robert <cr52@protonmail.com>
This commit is contained in:
parent
c835b97c5f
commit
3cd39e9399
1 changed files with 1 additions and 1 deletions
|
@ -434,7 +434,7 @@ Data Types
|
||||||
|
|
||||||
.. note:: There are places in the stdlib that check for an exact :class:`str`
|
.. note:: There are places in the stdlib that check for an exact :class:`str`
|
||||||
instead of a :class:`str` subclass (i.e. ``type(unknown) == str``
|
instead of a :class:`str` subclass (i.e. ``type(unknown) == str``
|
||||||
instead of ``isinstance(str, unknown)``), and in those locations you
|
instead of ``isinstance(unknown, str)``), and in those locations you
|
||||||
will need to use ``str(StrEnum.member)``.
|
will need to use ``str(StrEnum.member)``.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue