There’s a function that is wrapped by a decorator that returns the output of the function as HTML. I’d like to call that function without the HTML-wrapping of the decorator. Is that even possible?
Example:
class a:
@HTMLwrapper
def returnStuff(input):
return awesome_dict
def callStuff():
# here I want to call returnStuff without the @HTMLwrapper,
# i just want the awesome dict.
Since in python functions and methods are objects, and since a decorator returns a callable, you could set an attribute on the decorated method pointing to original method, but a call like my_object_instance.decorated_method.original_method() would be uglier and less explicit.