dictutils.mergedictΒΆ
- dictutils.mergedict(*args, path=None, update=True)[source]ΒΆ
Merge multiple nested mappings into a single dict.
If the first argument is a plain dict, it is updated in-place and returned. If the first argument is None or a non-dict Mapping, a new dict is created.
- Parameters:
*args β Mappings to merge (first one is modified in-place if possible)
path β Internal use for error reporting
update (
bool) β If True, values in later dicts override earlier ones
- Return type:
- Returns:
The merged dict (same object as first argument when possible)
- Raises:
TypeError β If no arguments provided or arguments are not mappings