[Python-Dev] PEP: Ordered Class Definition Namespace
ericsnowcurrently at gmail.com
Tue Jun 7 17:51:46 EDT 2016
On Tue, Jun 7, 2016 at 2:34 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> On 7 June 2016 at 14:20, Eric Snow <ericsnowcurrently at gmail.com> wrote:
>> What would you consider to be the
>> benefit of a mutable (or replaceable) __definition_order__ that
>> outweighs the benefit of a simpler definition of what's in it.
> Mainly the fact that class decorators and metaclasses can't hide the
> difference between "attributes defined in the class body" and
> "attributes injected by a decorator or metaclass". I don't have a
> concrete use case for that, it just bothers me on general principles
> when we have things the interpreter can do that can't readily be
> emulated in Python code.
Yeah, I see what you mean.
> However, if it proves to be a hassle in practice, making it writable
> can be done later based on specific use cases, so I don't mind if the
> PEP stays as it is on that front.
More information about the Python-Dev