]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
docs: Fix enum reassign `str` documentation (GH-101507)
authorPeter Gessler <gesslerpd@users.noreply.github.com>
Thu, 2 Feb 2023 20:12:57 +0000 (14:12 -0600)
committerGitHub <noreply@github.com>
Thu, 2 Feb 2023 20:12:57 +0000 (12:12 -0800)
Doc/library/enum.rst

index cfe4fbeb0698e78c8befd4b485602d9062010d55..13591a1bdc73471d8548f35a5f7b750d2e0e3b0c 100644 (file)
@@ -922,6 +922,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__