[Python-Dev] Re: __metaclass__ and __author__ are already decorators
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