Why arn\'t the following two scripts equivalent?
(Taken from another question: Understanding Python Decorators)
def makebold(fn): def wrapped():
The problem is replacing "makeitalic" (which takes one argument) with the "wrapped"-function in "makebold" which takes zero arguments.
Use *args, **kwargs to pass on arguments further down the chain:
*args, **kwargs
def wrapped(*args, **kwargs): return "" + fn(*args, **kwargs) + ""