I'm not sure why you would not want to use functools.wraps
, but you could add the doc string to wrapper
yourself:
def passmein(func):
def wrapper(*args, **kwargs):
return func(*args, **kwargs)
wrapper.__doc__ = func.__doc__
return wrapper
@passmein
def testfunc(me):
"""This is a test function"""
if __name__ == '__main__':
print testfunc.__doc__