[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
- Previous message: [Python-Dev] Re: __metaclass__ and __author__ are already decorators
- Next message: [Python-Dev] Re: __metaclass__ and __author__ are already decorators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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)
- Previous message: [Python-Dev] Re: __metaclass__ and __author__ are already decorators
- Next message: [Python-Dev] Re: __metaclass__ and __author__ are already decorators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]