Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
Open
Description
Documentation
Enum._add_alias_
and_add_value_alias_
were added in Python 3.13, but this is not clearly pointed out in the documentation:
https://docs.python.org/3/library/enum.html#enum.EnumType._add_alias_
There is an "Added in version 3.13" marker way down in theSupported _sunder_ names section, but this is unlikely to be discovered by someone looking at the documentation here.
Also, these methods are documented as being members ofEnumType
, while in reality, they are members ofEnum
:
Python3.13.3 (main,Apr112025,16:08:36) [GCC13.3.0]onlinuxType"help","copyright","credits"or"license"formoreinformation.>>>importenum>>>enum.EnumType._add_alias_Traceback (mostrecentcalllast):File"<python-input-1>",line1,in<module>enum.EnumType._add_alias_AttributeError:typeobject'EnumType'hasnoattribute'_add_alias_'>>>enum.Enum._add_alias_<functionEnum._add_alias_at0x784229e71120>
Finally, examples for these functions would help to understand their purpose.
Linked PRs
Metadata
Metadata
Assignees
Projects
Status
Todo