dictmerge

emlib.misc.dictmerge(dict1, dict2)[source]

Merge the contents of the two dicts.

If they have keys in common, the value in dict1 is overwritten by the value in dict2 :rtype: dict

>>> a, b = {'A': 1, 'B': 2}, {'B': 20, 'C': 30}
>>> dictmerge(a, b) == {'A': 1, 'B': 20, 'C': 30}
True