]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
docs: Fix enum reassign `str` documentation (GH-101507)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 2 Feb 2023 20:40:30 +0000 (12:40 -0800)
committerGitHub <noreply@github.com>
Thu, 2 Feb 2023 20:40:30 +0000 (12:40 -0800)
(cherry picked from commit 24cbc7a2a09bf22ff8122c1d50135e1c56622c95)

Co-authored-by: Peter Gessler <gesslerpd@users.noreply.github.com>
Doc/library/enum.rst

index b58f3dba0310f14b85c6b894b9106ec4927a37dc..1973578e788c6e6046a59fc6ff1444feb6306732 100644 (file)
@@ -914,6 +914,6 @@ Notes
 
    or you can reassign the appropriate :meth:`str`, etc., in your enum::
 
-       >>> from enum import IntEnum
+       >>> from enum import Enum, IntEnum
        >>> class MyIntEnum(IntEnum):
-       ...     __str__ = IntEnum.__str__
+       ...     __str__ = Enum.__str__