[Python-3000] Metaclasses in Py3K
Greg Ewing
greg.ewing at canterbury.ac.nz
Sun Dec 17 00:53:31 CET 2006
Talin wrote:
> My personal feeling on this issue is that just because the "keyword=X"
> syntax opens up other possibilities, doesn't mean we have to use them.
Even if the syntax was never used for anything else,
I still don't like it. Metaclasses are an elegant
concept that deserves an equally elegant syntax.
To my eyes, the keyword proposal just swaps one
ugly syntax for another.
The main use case for all this seems to be that
some metaclasses would like to know the order in
which attributes were defined. So here's an
alternative proposal: Leave the syntax the way it
is, and *always* use a specialised dict that
remembers the order of definition. The metaclass
can then use that information or ignore it as it
wishes.
--
Greg
More information about the Python-3000
mailing list