类(8)装饰器
2021-06-10 本文已影响0人
Sandra_liu
def before(func):
def new_now():
print("setup")
func()
return func
return new_now
@before
def now():
print("2019")
def test_demo():
now()
def before(func):
def new_now():
print("setup")
func()
return func
return new_now
@before
def now():
print("2019")
def test_demo():
now()