[New-bugs-announce] [issue42901] [Enum] move member creation to __set_name__ in order to support __init_subclass__
Ethan Furman
report at bugs.python.org
Mon Jan 11 20:27:28 EST 2021
New submission from Ethan Furman <ethan at stoneleaf.us>:
In discussions about moving the calls to `__set_name__` and `__init_subclass__`, Nick Coughlan made an observation:
Nick Coghlan:
> Both EnumMeta and ABCMeta should probably be relying on `__set_name__`
> for their per-member set up work these days, rather than deferring that
> work until after `__new__` returns.
By having `__set_name__` create the final members, they will be in place for the call to `__init_subclass__`.
----------
assignee: ethan.furman
components: Library (Lib)
messages: 384875
nosy: barry, eli.bendersky, ethan.furman
priority: high
severity: normal
stage: needs patch
status: open
title: [Enum] move member creation to __set_name__ in order to support __init_subclass__
type: enhancement
versions: Python 3.10
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42901>
_______________________________________
More information about the New-bugs-announce
mailing list