-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
Closed
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir
Description
Documentation
In the documentation for 3.12 and 3.13 the example is incorrect for the documentation of enum.Enum.__new__
.
Quote:
from enum import Enum
class MyIntEnum(Enum):
SEVENTEEN = '1a', 16
results in the call int('1a', 16) and a value of 17 for the member.
Should be:
from enum import Enum
class MyIntEnum(int, Enum):
SEVENTEEN = '1a', 16
results in the call int('1a', 16) and a value of 26 for the member.
Additionally, the code example is followed by a note
which is not resolving correctly (seemingly because it is missing a space):
Linked PRs
Metadata
Metadata
Assignees
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir