""" """ def print_stuff(f): def new_function(x): answer = f(x) print(" DEBUG: f({}) = {} ".format(x, answer)) return answer return new_function @print_stuff def f(x): return 2*x + 1 for i in range(3): y = f(i) # -------------- class Foo: # Instances of this are also functions. def __call__(self, x): return 2 * x + 1 foo = Foo() foo(3) # ------------- def bar(*x): print(x) bar(2,3,[5,10]) args = (2,3,4,5) bar(*args)