发布时间:2019-07-30 09:44:56编辑:auto阅读(1755)
#/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
51168
50576
41198
38027
32490
29393
28256
23110
23075
21395
1452°
2172°
1793°
1718°
2024°
1789°
2467°
4151°
4018°
2867°