[Python-checkins] [Enum docs]: fix order of arguments to isinstance() (#98542)
AlexWaygood
webhook-mailer at python.org
Sat Oct 22 07:29:10 EDT 2022
https://github.com/python/cpython/commit/327fc1c6fa11b007213287cbf46380b7afed9be3
commit: 327fc1c6fa11b007213287cbf46380b7afed9be3
branch: main
author: Clément Robert <cr52 at protonmail.com>
committer: AlexWaygood <Alex.Waygood at Gmail.com>
date: 2022-10-22T12:29:00+01:00
summary:
[Enum docs]: fix order of arguments to isinstance() (#98542)
files:
M Doc/library/enum.rst
diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst
index 1f317b9013d8..dcced28b8508 100644
--- a/Doc/library/enum.rst
+++ b/Doc/library/enum.rst
@@ -427,7 +427,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