
    ~fZ                    (    d dl mZ d dlmZmZ ddZy)    )annotations)AnyDictc                   | j                         D ]N  \  }}t        |t              r,||v st        ||   t              s/t        | |   ||          B||v sG||   | |<   P |j                         D ]  \  }}|| vs|| |<    | S )a  Merge two nested dictionaries.

    Effectively a recursive ``dict.update``.

    Examples
    --------
    Merge two flat dictionaries:
    >>> nested_update(
    ...     {'a': 1, 'b': 2},
    ...     {'b': 3, 'c': 4}
    ... )
    {'a': 1, 'b': 3, 'c': 4}

    Merge two nested dictionaries:
    >>> nested_update(
    ...     {'x': {'a': 1, 'b': 2}, 'y': 5, 'z': 6},
    ...     {'x': {'b': 3, 'c': 4}, 'z': 7, '0': 8},
    ... )
    {'x': {'a': 1, 'b': 3, 'c': 4}, 'y': 5, 'z': 7, '0': 8}

    )items
isinstancedictnested_update)thisthatkeyvalues       X/var/www/cvtools/html/venv/lib/python3.12/site-packages/traitlets/utils/nested_update.pyr
   r
      s    , jjl "
UeT"d{z$s)T:d3ic3D[S	DI" jjl 
Ud?DI K    N)r   Dict[Any, Any]r   r   returnr   )
__future__r   typingr   r   r
    r   r   <module>r      s    # !r   