Performance impact of using decorators

Alex Martelli aleaxit at yahoo.com
Fri Mar 10 22:21:54 EST 2006


vinjvinj <vinjvinj at gmail.com> wrote:

> >>what exactly made you think that Python would be able to run your
> >>code *without* calling your function ?
> 
> I was hoping that when the compiler finds decorators with wrapers that
> have the same signature it can some how "magically" combine them into
> one function (which gets called at run time) and not have 5 nested
> function calls. That is similar to what I will have to do eventually.
> 
> Given python's dynamic nature, I'm sure there are reasons why this is
> not done.

Yep, you'll have to build new functions yourself if you need them:-(


Alex



More information about the Python-list mailing list