<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" style="font-family: monospace; font-size: 11px;" class="">On Feb 28, 2017, at 8:14 PM, 语言破碎处 <<a href="mailto:mlet_it_bew@126.com" class="">mlet_it_bew@126.com</a>> wrote:<br class=""><br class="">We need not care other functions, just the "current" one.<br class=""> Other functions are definitely out of our control.<br class="">My last example distinguish 3 cases:<br class=""> self.f() # object/overloaded version<br class=""> __class__.f(self) # decorated version<br class=""> __this_func__(self) # prime version<br class=""></blockquote><br style="font-family: monospace; font-size: 11px;" class=""><div style="font-family: monospace; font-size: 11px;" class="">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__`.</div><div style="font-family: monospace; font-size: 11px;" class=""><br class=""></div><div style="font-family: monospace; font-size: 11px;" class="">See <a href="https://docs.python.org/3/library/functools.html#functools.update_wrapper" class="">https://docs.python.org/3/library/functools.html#functools.update_wrapper</a></div></div></body></html>