[Python-3000] PEP for Metaclasses in Python 3000
jcarlson at uci.edu
Wed Mar 14 00:24:57 CET 2007
"Thomas Wouters" <thomas at python.org> wrote:
> On 3/13/07, BJorn Lindqvist <bjourne at gmail.com> wrote:
> > On 3/13/07, Guido van Rossum <guido at python.org> wrote:
> > > > > I find this rather cool looking:
> > > > >
> > > > > class C(implements=(I1, I2)): ...
> > >
> > > Me too. :-)
> Who is the receiver of the implements keyword argument in your
> > example? Should it not be class class C(metaclass = SomethingHere,
> > implements = (I1, I2))?
> The receiver in Guido's example is of course the default metaclass, 'type'.
> (You can believe either that, or that it's just an example :-)
If I read the proposal correctly, it's actually metaclass.__prepare__,
as in metaclass.__prepare__(name, bases, kwargs) .
More information about the Python-3000