Discuss / Python / 交作业

交作业

Topic source

koma杰锅

#1 Created at ... [Delete] [Delete and Lock User]

import functools

def 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


  • 1

Reply