upkie 9.0.0
Open-source wheeled biped robots
|
None nested_update | ( | dict | target_dict, |
dict | new_dict | ||
) |
Update a target dictionary recursively.
Consider the following example:
>>> d = {"a": {"b": 1}} >>> d2 = {"a": {"c": 2}} >>> d.update(d2) >>> d {'a': {'c': 2}}
With this function:
>>> d = {"a": {"b": 1}} >>> d2 = {"a": {"c": 2}} >>> d.update(d2) >>> d {'a': {'b': 1, 'c': 2}}
target_dict | Output dictionary. |
new_dict | Input dictionary with new values to update. |