Python has a really cool feature called decorators. Which allow you to wrap functions around other functions in a clean way. The classic example would be the @trace decorator which would let us do this:
@trace
def sayHello(name):
print 'Hello %s!' % name
If we define the trace decorator like this: