我就废话不多说了,大家还是直接看代码吧! database = [ { "name": "18D_Block", "xcc":{ "component": { "core":[], "platform":[] }, }, "uefi":{ "component": { "core":[], "platform":[] }, } } ] class Dict(dict): __setattr__ = dict.__setitem__