#修饰器
import time
def waibu(f):
def neibu(x):
start=time.time()
print(’***************’)
f(x)
print(’***************’)
end=time.time()
print(end-start)
return neibu
@waibu
def zml(a):
print(a,521)
zml(‘abu’)
修饰器函数实例
猜你喜欢
转载自blog.csdn.net/YPL_ZML/article/details/88025551
今日推荐
周排行