[Python-Dev] Re: metaclass and author are already decorators (original) (raw)

Christophe Cavalaria chris.cavalaria at free.fr
Sat Aug 21 22:14:07 CEST 2004


Paul Morrow wrote:

class Foo: """ This describes the Foo class as normal. """ metaclass = M author = 'Paul Morrow' version = '0.1' automethods = True

def baz(self, a, b): """ This describes the baz method. """ synchronized = True returns = None author = 'Neville Shunt' # body of baz goes here...

It's a function call that masquerades as an attribute assignment. How worse can it be ? There's also the fact that it can't handle named parameters like a regular function call. You can't write that :

def foo(): decoration = (1,1,param=True)



More information about the Python-Dev mailing list