mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
bpo-42567: [Enum] call __init_subclass__ after members are added (GH-23714)
When creating an Enum, type.__new__ calls __init_subclass__, but at that point the members have not been added. This patch suppresses the initial call, then manually calls the ancestor __init_subclass__ before returning the new Enum class.
This commit is contained in:
parent
2a35137328
commit
6bd94de168
3 changed files with 104 additions and 2 deletions
|
|
@ -0,0 +1 @@
|
|||
`Enum`: call `__init_subclass__` after members have been added
|
||||
Loading…
Add table
Add a link
Reference in a new issue