In Python functions (function objects) can have attributes.
For example:
def func(a):
return a*a
func.attr = 1
Is there is a way to see this attribute and its value?
I have tried inspect.getfullargspec
from inspect
module but it shows only function arguments.
FullArgSpec(args=['a'], varargs=None, varkw=None, defaults=None, kwonlyargs=[], kwonlydefaults=None, annotations={})