https://stackoverflow.com/questions/3232943/update-value-of-a-nested-dictionary-of-varying-depth

https://stackoverflow.com/questions/3232943/update-value-of-a-nested-dictionary-of-varying-depth

 

import copy

d = {'k': 'kv'}
j_sc = {'k1': copy.copy(d)}
j_dc = {'k1': copy.deepcopy(d)}
jc = {'k1': d.copy()}
k = {'k1': d}
d = {'j': 'jv'}

posted @ 2020-02-13 01:13  papering  阅读(180)  评论(0编辑  收藏  举报