TypeError: unhashable type: 'collections.OrderedDict'

for repo in json_str.items():
    json_str[repo]['name']="123"

其中json_str为一个OrderedDict类型的多层字典,执行中报TypeError: unhashable type: 'collections.OrderedDict'错误
解决方法:

for repo ,config in json_str.items():
    json_str[repo]['name']="123"
原文地址:https://www.cnblogs.com/liurizhou/p/10196177.html