A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2004-June/045686.html below:

[Python-Dev] Re: decorators and 2.4

[Python-Dev] Re: decorators and 2.4 [Python-Dev] Re: decorators and 2.4Phillip J. Eby pje at telecommunity.com
Mon Jun 28 12:43:54 EDT 2004
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>


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4