o
    È·ež  ã                   @   s   d Z G dd„ deƒZdS )zJYet another implementation of bunch

attribute-access of items on a dict.
c                   @   s(   e Zd ZdZdd„ Zdd„ Zdd„ ZdS )	ÚBunchzA dict with attribute-accessc                 C   s$   z|   |¡W S  ty   t|ƒ‚w ©N)Ú__getitem__ÚKeyErrorÚAttributeError)ÚselfÚkey© r   úL/var/www/ideatree/venv/lib/python3.10/site-packages/traitlets/utils/bunch.pyÚ__getattr__   s
   ÿzBunch.__getattr__c                 C   s   |   ||¡ d S r   )Ú__setitem__)r   r   Úvaluer   r   r	   Ú__setattr__   s   zBunch.__setattr__c                 C   s   t i ƒ}| |  ¡ ¡ |S r   )ÚdirÚextendÚkeys)r   Únamesr   r   r	   Ú__dir__   s   zBunch.__dir__N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r
   r   r   r   r   r   r	   r   
   s
    r   N)r   Údictr   r   r   r   r	   Ú<module>   s    	