from functools import wraps def tester(f): @wraps(f) def test(*args,**kargs): print 'testing', args return f(*args,**kargs) return test @tester def worker(data): print 'working on data', data