mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
docs: Fix enum reassign str
documentation (GH-101507)
This commit is contained in:
parent
0675b8f032
commit
24cbc7a2a0
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue