New submission from Ethan Furman <et...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue42901>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to