[Python-ideas] A way out of Meta-hell (was: A (meta)class algebra) (original) (raw)
Joao S. O. Bueno jsbueno at python.org.br
Sun Feb 22 16:15:21 CET 2015
- Previous message: [Python-ideas] A way out of Meta-hell (was: A (meta)class algebra)
- Next message: [Python-ideas] A way out of Meta-hell (was: A (meta)class algebra)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 22 February 2015 at 11:54, Nick Coghlan <ncoghlan at gmail.com> wrote:
Ah, thank you: this discussion kicked a new naming idea lose in my brain, so I just pushed an update to PEP 422 that renames the proposed initclass hook to be called autodecorate instead. "It's an implicitly invoked class decorator that gets inherited by subclasses" is really the best way to conceive of the proposed hook, so having "init" as part of the name not only made it hard to remember whether the hook was initclass or classinit, it also got people thinking along completely the wrong lines. By contrast, the "auto" in "autodecorate" only makes sense as a prefix, and the inclusion of the word "decorate" in the name means it should be far more effective at triggering the reader's "class decorator" mental model rather than their "class initialisation" one.
Why not just "decorate" instead?
- Previous message: [Python-ideas] A way out of Meta-hell (was: A (meta)class algebra)
- Next message: [Python-ideas] A way out of Meta-hell (was: A (meta)class algebra)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]