Discuss / Python / 根据课程里面代码编写而成

根据课程里面代码编写而成

Topic source

Newself.

#1 Created at ... [Delete] [Delete and Lock User]
import functoolsdef metric(fn):    @functools.wraps(fn)    def wrapper(*args, **kw):        print('%s executed in %s ms' % (fn.__name__, 10.24))        return fn(*args, **kw)    return wrapper@metricdef fast(x, y):    time.sleep(0.0012)    return x + yprint(fast(11, 22))print(fast.__name__)

  • 1

Reply