From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Thu, 2 Feb 2023 20:40:30 +0000 (-0800) Subject: docs: Fix enum reassign `str` documentation (GH-101507) X-Git-Tag: v3.11.2~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=08f5c773594671606d8f51656b0881d36f4b5f11;p=thirdparty%2FPython%2Fcpython.git docs: Fix enum reassign `str` documentation (GH-101507) (cherry picked from commit 24cbc7a2a09bf22ff8122c1d50135e1c56622c95) Co-authored-by: Peter Gessler --- diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst index b58f3dba0310..1973578e788c 100644 --- a/Doc/library/enum.rst +++ b/Doc/library/enum.rst @@ -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__