Updating coordinate system mobjects

This commit is contained in:
Grant Sanderson
2019-02-06 21:16:26 -08:00
parent 24d6113bba
commit d88c301622
25 changed files with 425 additions and 354 deletions

View File

@ -56,12 +56,16 @@ def digest_config(obj, kwargs, caller_locals={}):
obj.__dict__ = merge_config(all_dicts)
# TODO, priority here is backwards from dict.update.
# Should I change the convention?
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.
First dicts have higher priority
When values are dictionaries, it is applied recursively
"""
all_config = reduce(op.add, [list(d.items()) for d in all_dicts])