ws.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:web_ctp 作者: molebot 项目源码 文件源码
def bridge_set(a,b,c):
    if c not in ['int','str','float']:return 'error type'
    _d = bg.get_instrument()
    _l = a.split('.')
    b = eval(c)(b)
    _tmp = _d
    _out = []
    for one in _l:
        _out.append((one,_tmp))
        if one in _tmp:
            _tmp = _tmp[one]
        else:
            return '%s not in correct place'%one
    _tmp = b
    _n = {}
    for k,d in _out[::-1]:
        d[k] = _tmp
        _tmp = d
    bg.set_instrument(_tmp)
    return str(_tmp)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号