Re: [Python-Dev] Re: decorators and 2.4
28 Jun
2004
28 Jun
'04
4:43 p.m.
At 12:28 PM 6/28/04 -0400, Jewett, Jim J wrote:
But you would also see things like
dec1() # No good way to chain decorators. def g(): pass g=dec2(g)
This works with the proof-of-concept code I posted: [dec2(), dec1()] def g(): pass and so does this: dec2() dec1() def g(): pass So, I don't know what you mean about no good way to chain them. The chaining is implemented in the tracing hook.
Personally, I want decorators tied together with a word (such as "decorate" or "using"), but I admit that list brackets + line-break *might* be enough.
You can always do this: def using(*args): pass <wink>
7239
Age (days ago)
7239
Last active (days ago)
0 comments
1 participants
participants (1)
-
Phillip J. Eby