16 Jan
2021
16 Jan
'21
11:03 a.m.
On Tue, 12 Jan 2021, 11:55 am Ethan Furman,
On 1/7/21 4:56 AM, Nick Coghlan wrote:
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.
And here I was thinking that `__set_name__` was for, well, setting the name. ;-)
Yeah, __set_owner__ was also discussed as a possible name, since the method notifies the descriptor of both the defining class and the attribute name within that class. We decided we preferred __set_name__ out of the two short options.
But it does work.
Good to hear :) Cheers, Nick.