def deco(func):
def wrapper():
print("1 before myfunc() called.")
func()
print(" 2 after myfunc() called.")
return wrapper
@deco
def myfun():
print("myfun")
myfun()
def deco(func):
def wrapper():
print("1 before myfunc() called.")
func()
print(" 2 after myfunc() called.")
return wrapper
@deco
def myfun():
print("myfun")
myfun()