ó
äÛi^c           @   s    d  Z  d e f d „  ƒ  YZ d S(   sJ   Yet another implementation of bunch

attribute-access of items on a dict.
t   Bunchc           B   s)   e  Z d  Z d „  Z d „  Z d „  Z RS(   s   A dict with attribute-accessc         C   s5   y |  j  | ƒ SWn t k
 r0 t | ƒ ‚ n Xd  S(   N(   t   __getitem__t   KeyErrort   AttributeError(   t   selft   key(    (    s4   lib/python2.7/site-packages/traitlets/utils/bunch.pyt   __getattr__   s    c         C   s   |  j  | | ƒ d  S(   N(   t   __setitem__(   R   R   t   value(    (    s4   lib/python2.7/site-packages/traitlets/utils/bunch.pyt   __setattr__   s    c         C   s#   t  i  ƒ } | j |  j ƒ  ƒ | S(   N(   t   dirt   extendt   keys(   R   t   names(    (    s4   lib/python2.7/site-packages/traitlets/utils/bunch.pyt   __dir__   s    (   t   __name__t
   __module__t   __doc__R   R	   R   (    (    (    s4   lib/python2.7/site-packages/traitlets/utils/bunch.pyR    	   s   		N(   R   t   dictR    (    (    (    s4   lib/python2.7/site-packages/traitlets/utils/bunch.pyt   <module>   s   