In [2]:
def decorator(f):
    print 'decorator is called for function {0}'.format(f)
    return f

In [3]:
@decorator
def func():
    print 'function func() is called'


decorator is called for function <function func at 0x103ec0cf8>

In [4]:
func()


function func() is called

In [ ]: