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.

请先 登录 后评论

1 个回答

Juntao Wang

tuple中的元素不能修改。

请先 登录 后评论