9 lines
255 B
Python
9 lines
255 B
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
|
|
def dict_merge(d0, d1):
|
|
for k, v in d1.items():
|
|
if (k in d0 and isinstance(d0[k], dict) and isinstance(d1[k], dict)):
|
|
dict_merge(d0[k], d1[k])
|
|
else:
|
|
d0[k] = d1[k]
|