On Feb 28, 2017, at 8:14 PM, 语言破碎处 <mlet_it_bew@126.com> wrote:
We need not care other functions, just the "current" one.
Other functions are definitely out of our control.
My last example distinguish 3 cases:
self.f() # object/overloaded version
__class__.f(self) # decorated version
__this_func__(self) # prime version
If your decorator uses `functools.wraps` or `functools.update_wrapper` (it should, for lots of reasons, and many, perhaps most, third party wrappers do), then you can access the wrapped function as `decorated.__wrapped__`.