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)
评论列表
文章目录