def deco(f): def inner(*args, **kwargs): print(f) return f(*args, **kwargs) return inner # @deco def foo(): """ Foo is just a function. """ return None foo = deco(foo)