Code: Alles auswählen
>>> def my_decorator(f):
... @wraps(f)
... def wrapper(*args, **kwds):
... print 'Calling decorated function'
... return f(*args, **kwds)
... return wrapper
...
>>> @my_decorator
... def example():
... """Docstring"""
... print 'Called example function'
Wie bekomme ich es also hin, dass `functools.wraps()` auch die Argumente korrekt übernimmt? Oder anders: Was muss ich den `WRAPPER_ASSIGNMENTS` anfügen, damit es funktioniert?