Skip to content

other

Functions:

deepmerge

deepmerge(
    source: dict[Any, Any], destination: dict[Any, Any]
) -> dict[Any, Any]
Source code in jetpytools/functions/other.py
 8
 9
10
11
12
13
14
15
16
def deepmerge(source: dict[Any, Any], destination: dict[Any, Any]) -> dict[Any, Any]:
    for key, value in source.items():
        if isinstance(value, dict):
            node = destination.setdefault(key, {})
            deepmerge(value, node)
        else:
            destination[key] = value

    return destination