[Python-Dev] Re: decorators and 2.4

Phillip J. Eby pje at telecommunity.com
Sat Jun 26 01:23:54 EDT 2004


At 09:47 PM 6/25/04 -0700, Bill Janssen wrote:
>I could also see the function call version:
>
>   from decorators import decorate
>   ...
>   def foo (bar):
>       decorate(bletch, flappy)
>       ...
>
>where decorate is automatically applied to "foo".

That won't work, since by the time the function is called it's too late to 
redefine foo.




More information about the Python-Dev mailing list