merge_dicts

Contents

merge_dicts#

merge_dicts(d1, d2)[source]#

Recursively merge d2 into a copy of d1.

Values in d2 override values in d1 in case of conflicts; nested dictionaries are merged recursively. d1 is not modified.

Parameters:
  • d1 (dict) – First dictionary.

  • d2 (dict) – Second dictionary.

Returns:

dict – Merged dictionary.