B
    äŠ<[Œ  ã               @   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,   y
|   |¡S  tk
r&   t|ƒ‚Y nX d S )N)Ú__getitem__ÚKeyErrorÚAttributeError)ÚselfÚkey© r   ú4lib/python3.7/site-packages/traitlets/utils/bunch.pyÚ__getattr__   s    
zBunch.__getattr__c             C   s   |   ||¡ d S )N)Ú__setitem__)r   r   Úvaluer   r   r   Ú__setattr__   s    zBunch.__setattr__c             C   s   t i ƒ}| |  ¡ ¡ |S )N)Ú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   