[issue9157] Allow inspection of used decorators on a function

Nick Coghlan report at bugs.python.org
Sat Aug 21 19:01:29 CEST 2010


Nick Coghlan <ncoghlan at gmail.com> added the comment:

How?

It was easy for wraps to add the __wrapped__ attribute, since it has access to both the wrapping function and the function being wrapped.

But it hasn't got a clue as to the identity of the decorator that is applying the wrapper.

Absent a concrete suggestion for how to actually do this cleanly, I'm inclined to reject the idea as being infeasible given the way decorators are applied.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9157>
_______________________________________


More information about the Python-bugs-list mailing list