Object without ownership could not be modified

在DolphinDB database中执行以下代码:

infos = []
info = dict(INT,INT)
info[1] = 1
infos.append!(info)
infos.append!(info)

def modify(mutable d){
 d[0] = 4
}

modify(infos[0])

报错:

modify(infos[0]) => modify: d[0] = 4 => Object without ownership could not be modified.
阅读 2k
1 个回答

tuple中的元素不能修改。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进