I am using Python to write a function decorator that logs the arguments and returns value of the function when it is called
def logfunc(prefix)
The output should be to sys.stderr in the format:
"{prefix}: {function name}({positional args}..., {keyword=args}, ...)"
and
"{prefix}: {function name} -> {return value}"
respectively for call and return.
This is how it is used:
@logfunc("test")
def f(arg)
return arg
I dont quiet understand it? Can someone show me a pointer?