On 03:24 pm, [email protected] wrote: >Until now we haven't AFAIK used decorator syntax, but I think it's time >we start to. In places where we were already using decorators without >the special syntax, that is. > >Consider: > > def foo(cls, arg): > # lalalal > foo = classmethod(foo) > >One has to type "foo" three times (a potential source of error), and >the special semantics of the function are known to the reader only >*after* reading the function. On the other hand: > > @classmethod > def foo(cls, arg): > # lalalal > >This suffers from none of these problems. > >Any disagreement?
Can we start with a limited experimental usage? Some new code can be written this way, and we'll see if there's any negative feedback following the next release. I don't want existing code to get ported to the new syntax just because it's possible now. Jean-Paul _______________________________________________ Twisted-Python mailing list [email protected] http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
