
    j                    >    d Z ddlmZ ddlmZ  G d de          ZdS )zJYet another implementation of bunch

attribute-access of items on a dict.
    )annotations)Anyc                  4     e Zd ZdZddZdd	Zd fdZ xZS )BunchzA dict with attribute-accesskeystrreturnr   c                r    	 |                      |          S # t          $ r}t          |          |d }~ww xY wN)__getitem__KeyErrorAttributeError)selfr   es      \/home/ubuntu/.hermes/hermes-agent/venv/lib/python3.11/site-packages/traitlets/utils/bunch.py__getattr__zBunch.__getattr__   sJ    	-##C((( 	- 	- 	- %%1,	-s    
616valueNonec                2    |                      ||           d S r   )__setitem__)r   r   r   s      r   __setattr__zBunch.__setattr__   s    e$$$$$    	list[str]c                    g }|                     t                                                                 |                     |                                            |S r   )extendsuper__dir__keys)r   names	__class__s     r   r   zBunch.__dir__   sG    UWW__&&'''TYY[[!!!r   )r   r   r	   r   )r   r   r   r   r	   r   )r	   r   )__name__
__module____qualname____doc__r   r   r   __classcell__)r    s   @r   r   r      sk        &&- - - -% % % %         r   r   N)r$   
__future__r   typingr   dictr    r   r   <module>r*      si     # " " " " "          D     r   