U
    sVÞc;  ã                   @  sH   d dl mZ d dlmZmZ edƒZedƒZG dd„ deeef ƒZdS )é    )Úannotations)ÚChainMapÚTypeVarÚ_KTÚ_VTc                   @  s2   e Zd ZdZddddœdd„Zdddœd	d
„ZdS )ÚDeepChainMapz~
    Variant of ChainMap that allows direct updates to inner scopes.

    Only works when all passed mapping are mutable.
    r   r   ÚNone)ÚkeyÚvalueÚreturnc                 C  s4   | j D ]}||kr|||<  d S q|| j d |< d S )Nr   )Úmaps)Úselfr	   r
   Úmapping© r   ú:/tmp/pip-unpacked-wheel-xj8nt62q/pandas/compat/chainmap.pyÚ__setitem__   s
    
zDeepChainMap.__setitem__)r	   r   c                 C  s,   | j D ]}||kr||=  dS qt|ƒ‚dS )z\
        Raises
        ------
        KeyError
            If `key` doesn't exist.
        N)r   ÚKeyError)r   r	   r   r   r   r   Ú__delitem__   s
    
zDeepChainMap.__delitem__N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r      s   r   N)Ú
__future__r   Útypingr   r   r   r   r   r   r   r   r   Ú<module>   s   