@mydecorator
def func2(f1, kw='default'):
    pass
decorated_argspec = inspect.getargspec(func2)
print(decorated_argspec)
assert bare_argspec == decorated_argspec
How can I programmatically change the argspec of a function in a python decorator?