📅  最后修改于: 2022-03-11 14:46:08.947000             🧑  作者: Mango
import collections.abc
def update(d, u):
for k, v in u.items():
if isinstance(v, collections.abc.Mapping):
d[k] = update(d.get(k, {}), v)
else:
d[k] = v
return d