[Python-Dev] On decorators implementation
paolo_veronelli at libero.it
Sun Aug 21 11:35:37 CEST 2005
I noticed (via using them) that decorations are applied to methods
before they become methods.
This choice flattens down the implementation to no differentiating
methods from functions.
I have to apply euristics on the wrapped function type when I use the
function as an index key.
if type(observed) is types.MethodType:
things like this are inside my decorators.
The behavior of decorations are not definable.
I imagine that a method implementation of them inside the type metaclass
could be better specified by people.
This probably ends up in metamethods or something I can't grasp
More information about the Python-Dev