参数r的意义
ef performance(f):
def fn(*args,**kw):
t1 = time.time()
r = f(*args,**kw)
t2 = time.time()
print 'call %s() in %fs' % (f.__name__, (t2 - t1))
return r
return fn
以上代码中的r代表了什么?
ef performance(f):
def fn(*args,**kw):
t1 = time.time()
r = f(*args,**kw)
t2 = time.time()
print 'call %s() in %fs' % (f.__name__, (t2 - t1))
return r
return fn
以上代码中的r代表了什么?
2019-02-22
举报