Added description of merge_config

This commit is contained in:
Grant Sanderson 2018-11-29 17:30:19 -08:00
parent a5d9d9e28d
commit dde76eddb1

View file

@ -57,6 +57,13 @@ def digest_config(obj, kwargs, caller_locals={}):
def merge_config(all_dicts):
"""
Creates a dict whose keyset is the union of all the
input dictionaries. The value for each key is based
on the first dict in the list with that key.
When values are dictionaries, it is applied recursively
"""
all_config = reduce(op.add, [list(d.items()) for d in all_dicts])
config = dict()
for c in all_config: