def my_decorator(func): def wrapper(): print('Something happening before the func is called.') func() print('Something happening after the func is called.') return wrapper @my_decorator def say_whee(): print('Whee!') say_whee()