#装饰器
def printpy(func):
def inner_func():
func()
print("hello python! Geovin Du")
return inner_func
# @装饰器
@printpy
def printhello():
print("hello world!")
#调用
printhello()
#装饰器
def printpy(func):
def inner_func():
func()
print("hello python! Geovin Du")
return inner_func
# @装饰器
@printpy
def printhello():
print("hello world!")
#调用
printhello()