Beispiel #1
0
def indicator(f):
    f.storage = {}
    aspecs = getargspec(f).args
    f.tpos = aspecs.index('_ts')
    assert f.tpos == len(
        aspecs) - 1, 'position of _ts is invalid'  #_ts必须是最后一个固定位置参数
    return decorator.decorator(_indicator, f)
Beispiel #2
0
def indicator(f):
    f.storage = {}
    aspecs = getargspec(f).args
    f.tpos = aspecs.index('_ts')
    assert f.tpos == len(aspecs)-1,'position of _ts is invalid'  #_ts必须是最后一个固定位置参数
    return decorator.decorator(_indicator,f)
Beispiel #3
0
def icache(f):
    f.cache = {}
    return decorator.decorator(_icache, f)
Beispiel #4
0
def icache(f):
    f.cache = {}
    return decorator.decorator(_icache,f)