for repo in json_str.items(): json_str[repo]['name']="123"
其中json_str为一个OrderedDict类型的多层字典,执行中报TypeError: unhashable type: 'collections.OrderedDict'错误 解决方法:
TypeError: unhashable type: 'collections.OrderedDict'
for repo ,config in json_str.items(): json_str[repo]['name']="123"