Decorators, Identity functions and execution...
Chance Ginger
cginboston at hotmail.com
Sun Apr 9 02:57:55 EDT 2006
More information about the Python-list mailing list
Sun Apr 9 02:57:55 EDT 2006
- Previous message (by thread): Decorators, Identity functions and execution...
- Next message (by thread): Decorators, Identity functions and execution...
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
If I define a decorator like: def t(x) : def I(x) : return x return I and use it like: @t(X) def foo(a) : # definition of foo... pass or maybe this: @t(X) @(Y) def bar(a) : # The definition of bar... Will in encounter much of a penalty in executing 'foo' or 'bar'? If so, is there a way to define t such that Python knows it is the identity function and short-circuit evaluation? Thanks in advance.
- Previous message (by thread): Decorators, Identity functions and execution...
- Next message (by thread): Decorators, Identity functions and execution...
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list