zoukankan      html  css  js  c++  java
  • wraps的补充

    # 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
    '''
  • 相关阅读:
    1.Hibernate配置
    CKEditor/FCKEditor的使用
    介绍一个好用的工具类库commons-beanutils
    SpringBean.xml配置
    MVC框架显示层——Velocity技术
    mysql CMD命令
    day 05
    day 04
    day03
    python day 02
  • 原文地址:https://www.cnblogs.com/0B0S/p/11983463.html
Copyright © 2011-2022 走看看