[Python-checkins] [Enum docs]: fix order of arguments to isinstance() (GH-98542)

miss-islington webhook-mailer at python.org
Sat Oct 22 07:36:07 EDT 2022


https://github.com/python/cpython/commit/3cd39e9399796ebbf54fbc9402a21c98dfddb6a8
commit: 3cd39e9399796ebbf54fbc9402a21c98dfddb6a8
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-10-22T04:36:01-07:00
summary:

[Enum docs]: fix order of arguments to isinstance() (GH-98542)

(cherry picked from commit 327fc1c6fa11b007213287cbf46380b7afed9be3)

Co-authored-by: Clément Robert <cr52 at protonmail.com>

files:
M Doc/library/enum.rst

diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst
index 1abd25dc50a7..d666fa96e7cc 100644
--- a/Doc/library/enum.rst
+++ b/Doc/library/enum.rst
@@ -434,7 +434,7 @@ Data Types
 
    .. 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 ``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)``.
 
    .. note::



More information about the Python-checkins mailing list