发布时间:2019-07-30 09:44:56编辑:auto阅读(2026)
#/usr/bin/env python3
import time
def outer(key):
def timer(func):
def wrapper(*args,**kwargs):
print(key)
s=time.time()
res=func(*args,**kwargs)
e=time.time()
print(e-s)
return res
return wrapper
return timer
@outer('dec info')
def do(a):
time.sleep(1)
print(a)
return a+1

上一篇: 安装H3C的各种问题
下一篇: Python Day16 Django
53570
40397
34804
30551
25433
25219
23645
18965
15224
14727
1209°
1127°
1191°
1216°
1248°
1407°
1359°
1325°
1429°
1375°