[Python-3000] PEP for Metaclasses in Python 3000 (original) (raw)
BJörn Lindqvist bjourne at gmail.com
Tue Mar 13 18:57:54 CET 2007
- Previous message: [Python-3000] PEP for Metaclasses in Python 3000
- Next message: [Python-3000] PEP for Metaclasses in Python 3000
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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. :-)
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))?
-- mvh Björn
- Previous message: [Python-3000] PEP for Metaclasses in Python 3000
- Next message: [Python-3000] PEP for Metaclasses in Python 3000
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]