commit | 6bd94de168b58ac9358277ed6f200490ab26c174 | [log] [tgz] |
---|---|---|
author | Ethan Furman <ethan@stoneleaf.us> | Wed Dec 09 16:41:22 2020 -0800 |
committer | GitHub <noreply@github.com> | Wed Dec 09 16:41:22 2020 -0800 |
tree | 01dfe448e2651e084d9d8e34eb7a301b2c6cc6c7 | |
parent | 2a35137328154aa2513649dcf0bbef02c998e27c [diff] |
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.