How can I identify if the current function being decorated is a method (belonging to a class) or a function?
class ClassA:
@mydecorator
def method(self)
pass
@staticmethod
@mydecorator
def function()
pass
mydecorator need to know if the decorated function is:
- a method (is_method)
- a static method (is_static)
- a class method (is_classmethod)
- a global function (is_function)
How can we do this?
Thanks!