九州体育网 - 十年信誉网站

关于作者

Discuss / Python / 作业

作业

Topic source

7788爱吃M

#1 Created at ...

#-- coding: utf-8 -- import time import functools

def metric(func): @functools.wraps(func) def wrapper(args,**kw): a=time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) print('%s executed in %s ms' % (func.name, a)) return func(args, **kw) return wrapper @metric

def now(): return '2019-01-11' print(now())


  • 1

Reply

WARNING: You are using an old browser that does not support HTML5. Please choose a modern browser (Chrome / Microsoft Edge / Firefox / Sarafi) to get a good experience.