Is it possible to give a wrapped function the arg and kwargs names of the function it is wrapping? I need to do this because decorators that are applied later use the arg names of the underlying function.
def wrapper(func):
def wrapped(<func args and kwargs names and values>):
return func(*args, **kwargs)
So if the func been passed in was foo(x,y=3), the returned wrapped function would have the signature wrapped(x, y=3) instead of the usual wrapped(*args, **kwargs).
--Edit--
Just found that this is a duplicate of Preserving signatures of decorated functions . Thanks for the answers anyway