Passing default arguments to a decorator in python
问题 I am trying to find a way to pass my functions default arguments to the decorator. I have to say I am fairly new to the decorator business, so maybe I just don't understand it properly, but I have not found any answers yet. So here my modified example from the python functools.wraps manual page. from functools import wraps def my_decorator(f): @wraps(f) def wrapper(*args, **kwds): print 'Calling decorated function' print 'args:', args print 'kwargs:', kwds return f(*args, **kwds) return