o
    È·eç  ã                   @   s   d d„ Z dS )c                 C   s€   |   ¡ D ](\}}t|tƒr"||v r!t|| tƒr!t| | || ƒ q||v r,|| | |< q|  ¡ D ]\}}|| vr=|| |< q1| 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Úvalue© r	   úT/var/www/ideatree/venv/lib/python3.10/site-packages/traitlets/utils/nested_update.pyr      s   
€€€r   N)r   r	   r	   r	   r
   Ú<module>   s   