DictionaryMerge

DictionaryMerge(dictA, dictB, overwrite=False, updateMode=False)

Merge and update a dictionary with another dictionary by merge two dictionaries into one.

param dictA:dictionary object
param dictB:dictionary object to merge with.
param overwrite:
 If True, the values in dictB will replace the value in dictA if the same key is found. If multiple values found for the same key, the value will be replaced with “(varies)”
param updateMode:
 Update the dictA object. This is useful if input is an OrderedDict.
returns:The merged dictionary on success.

Example

a = {“a”:1, “b”:4} b = {“b”:1, “c”:16} z = DictionaryMerge(a, b) print z >>>>{‘a’: 1, ‘c’: 16, ‘b’: 1}