a
    «Á‚b÷  ã                   @   s    d dl mZ G dd„ deƒZdS )é    )Údefaultdictc                       s.   e Zd ZdZd‡ fdd„	Z‡ fdd„Z‡  ZS )ÚBoundDictionarya  
    A default dictionary where elements are tightly coupled.

    The factory method is responsible for binding the parent object to the child.

    If a reference attribute is assigned then child objects will have the key assigned to this.

    Otherwise it's just a defaultdict.
    Nc                    s    || _ tt| ƒj|i |¤Ž d S ©N)Ú	referenceÚsuperr   Ú__init__)Úselfr   ÚargsÚkw©Ú	__class__© úo/Users/vegardjervell/Documents/master/model/venv/lib/python3.9/site-packages/openpyxl/utils/bound_dictionary.pyr      s    zBoundDictionary.__init__c                    s,   t t| ƒ |¡}| jd ur(t|| j|ƒ |S r   )r   r   Ú__getitem__r   Úsetattr)r   ÚkeyÚvaluer   r   r   r      s    
zBoundDictionary.__getitem__)N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Ú__classcell__r   r   r   r   r      s   
r   N)Úcollectionsr   r   r   r   r   r   Ú<module>   s   