[Python-3000] Compiling the PEP 3115 metaclass syntax (original) (raw)

Robert Brewer fumanchu at amor.org
Thu Mar 15 04:12:44 CET 2007


Guido van Rossum wrote:

The PEP proposes that the class statement accepts keyword arguments, *args, and **kwds syntax as well as positional bases. This is a bit messy to compile and execute, but we already have this, of course, in the code for calling regular functions.

So I think it would be acceptable to this into a call to a new (hidden) built-in function, named buildclass. Then that this class definition: class C(A, B, metaclass=M, other=42, *morebases, *morekwds): ... would translate into this: C = buildclass(, 'C', A, B, metaclass=M, other=42, *morebases, *morekwds)

This sounds familiar ;) http://mail.python.org/pipermail/python-dev/2004-March/043562.html

Why not just call that function "class" and get it over with? ;)

Robert Brewer System Architect Amor Ministries fumanchu at amor.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-3000/attachments/20070314/5b4a8ee6/attachment.htm



More information about the Python-3000 mailing list