cfitall.utils¶
This module is full of little recursive functions that help with converting string-path notations into nested dicts, and vice versa. A string-path, or “flattened” dict might look like this:
{‘foo.bar.bat’: ‘asdfhjklkjhfdsa’}
As an “expanded” or “nested” dict, the same data would be:
{‘foo’: {‘bar’: {‘bat’: ‘lkjhgfdsasdfghjkl’}}}
Functions
Nests keys from srclist into destdict, with optional value set on the final key. |
|
Expands a flattened dict into a nested dict, e.g. |
|
Expands a dotted path into a nested dict; if value is set, the final key in the path will be set to value. |
|
Flattens a deeply nested dictionary into a flattened dictionary. |
|
Performs a deep merge of two nested dicts by expanding all Mapping objects until they reach a non-mapping value (e.g. |