Fork me on GitHub
# import time
# def index(name):
# '''index函数'''
# time.sleep(1)
# print('Welcome %s to China'%name)
# return 521
# print(help(index))
'''
Help on function index in module __main__:

index(name)
index函数

None
'''
# import time
# def timmer(func):
# def inner(*args,**kwargs):
# start = time.time()
# res=func(*args,**kwargs)
# stop = time.time()
# print('run time is %s' % (stop - start))
# return res
# return inner
# @timmer
# def index(name):
# '''index函数'''
# time.sleep(1)
# print('Welcome %s to China'%name)
# return 521
# print(help(index))
'''
Help on function inner in module __main__:

inner(*args, **kwargs)

None
'''
# import time
# def timmer(func):
# def inner(*args,**kwargs):
# start = time.time()
# res=func(*args,**kwargs)
# stop = time.time()
# print('run time is %s' % (stop - start))
# return res
# inner.__doc__=func.__doc__
# inner.__name__=func.__name__
# return inner
# @timmer
# def index(name):
# '''index函数'''
# time.sleep(1)
# print('Welcome %s to China'%name)
# return 521
# print(help(index))
'''
Help on function inner in module __main__:

inner(*args, **kwargs)
index函数
None
'''
'''
Help on function index in module __main__:

index(*args, **kwargs)
index函数
None
'''
# from functools import wraps
# import time
# def timmer(func):
# @wraps(func)
# def inner(*args,**kwargs):
# start = time.time()
# res=func(*args,**kwargs)
# stop = time.time()
# print('run time is %s' % (stop - start))
# return res
# return inner
# @timmer
# def index(name):
# '''index函数'''
# time.sleep(1)
# print('Welcome %s to China'%name)
# return 521
# print(help(index))
'''
Help on function index in module __main__:

index(name)
index函数

None
'''
posted on 2019-12-04 16:01  OBOS  阅读(170)  评论(0编辑  收藏  举报