def first(func): def inner(): print("this is firt!") func() return inner def second(func): def inner(): print("this is second!") func() return inner def third(func): def inner(): print("this is third!") func() return inner @second @first @third def myfun(): print("this is my fun()!") myfun()
输出
this is second!
this is firt!
this is third!
this is my fun()!
无需解释