[PEAK] add_assignment_advisor and legacy decorator syntax
Phillip J. Eby
pje at telecommunity.com
Sat Apr 8 02:58:21 EDT 2006
At 02:12 AM 4/8/2006 +0200, Simon Belak wrote:
>Can "simple" (single level of nesting) decorators, to be used with Python
><2.4 compatible syntax, be done using add_assignment_advisor?
>
> def deco(func):
> def call(*args, **kw):
> ...
> return call
>
> [deco]
> def foo(x,y):
> ...
>
>or there needs to be a call made inside [] for it to work?
There must be a call, otherwise Python just makes a list and throws it away.
More information about the PEAK
mailing list