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
    '''
  • 相关阅读:
    log4j日志基本配置
    MyBatis基本应用
    Java properties配置文件
    Java DAO模式
    Java方式 MySQL数据库连接
    bug 复制代码没有审查,没有完全就该变量名
    cocos3 深入理解tiledmap
    cocos3 深入理解单例模式
    cocos3 CC_BREAK_IF(m_pGameMap==NULL);
    cocos2d3 宏定义屏幕宽高,这样就不用重复获取了
  • 原文地址:https://www.cnblogs.com/0B0S/p/11983463.html
Copyright © 2011-2022 走看看