mirror of
https://github.com/python/cpython.git
synced 2024-11-30 13:24:13 +08:00
docs: Fix enum reassign str
documentation (GH-101507)
This commit is contained in:
parent
0675b8f032
commit
24cbc7a2a0
@ -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__
|
||||
|
Loading…
Reference in New Issue
Block a user