BJörn Lindqvist schrieb:
> On 3/13/07, Guido van Rossum <[EMAIL PROTECTED]> wrote:
>> > > I find this rather cool looking:
>> > >
>> > >   class C(implements=(I1, I2)): ...
>>
>> Me too. :-)
> 
> But... What does it do? PEP says:
> 
> In the new model, the syntax for specifying a metaclass is via a
> keyword argument in the list of base classes:
> 
>       class Foo(base1, base2, metaclass=mymeta):
>         ...
> 
> Additional keywords will also be allowed here, and will be passed to
> the metaclass, as in the following example:
> 
>       class Foo(base1, base2, metaclass=mymeta, private=True):
>         ...
> 
> Who is the receiver of the implements keyword argument in your
> example? Should it not be class class C(metaclass = SomethingHere,
> implements = (I1, I2))?

If Foo inherits from another class whose metaclass already accepts
"implements", it should work.

I can't see how "class C(implements=(I1, I2))" would work though,
without a hook to set a default metaclass.

Georg

_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to