MINI MINI MANI MO
ó
i:Oc           @   s^   d  Z  y d d l m Z Wn! e k
 r= d d l m Z n Xd e f d „  ƒ  YZ d Z d S(   s§   
----------
StrictDict
----------
:class:`kitchen.collections.StrictDict` provides a dictionary that treats
:class:`str` and :class:`unicode` as distinct key values.
iÿÿÿÿ(   t   defaultdictt
   StrictDictc           B   sJ   e  Z d  Z d „  Z d „  Z d „  Z d „  Z e Z d „  Z d „  Z	 RS(   sQ  
    Map class that considers :class:`unicode` and :class:`str` different keys
    Ordinarily when you are dealing with a :class:`dict` keyed on strings you
    want to have keys that have the same characters end up in the same bucket
    even if one key is :class:`unicode` and the other is a byte :class:`str`.
    The normal :class:`dict` type does this for :term:`ASCII` characters (but
    not for anything outside of the :term:`ASCII` range.)
    Sometimes, however, you want to keep the two string classes strictly
    separate, for instance, if you're creating a single table that can map
    from :class:`unicode` characters to :class:`str` characters and vice
    versa.  This class will help you do that by making all :class:`unicode`
    keys evaluate to a different key than all :class:`str` keys.
    .. seealso::
        :class:`dict`
            for documentation on this class's methods.  This class implements
            all the standard :class:`dict` methods.  Its treatment of
            :class:`unicode` and :class:`str` keys as separate is the only
            difference.
    c         C   s   t  j |  t | ƒ | f ƒ S(   N(   R    t   __getitem__t   repr(   t   selft   key(    (    sB   /usr/lib/python2.7/site-packages/kitchen/collections/strictdict.pyR   B   s    c         C   s#   t  j |  t | ƒ | f | ƒ d  S(   N(   R    t   __setitem__R   (   R   R   t   value(    (    sB   /usr/lib/python2.7/site-packages/kitchen/collections/strictdict.pyR   E   s    c         C   s    t  j |  t | ƒ | f ƒ d  S(   N(   R    t   __delitem__R   (   R   R   (    (    sB   /usr/lib/python2.7/site-packages/kitchen/collections/strictdict.pyR   H   s    c         c   s'   x  t  j |  ƒ D] } | d Vq Wd  S(   Ni   (   R    t   __iter__(   R   t   i(    (    sB   /usr/lib/python2.7/site-packages/kitchen/collections/strictdict.pyR	   K   s    c         C   s   t  |  j ƒ  ƒ S(   N(   t   listR	   (   R   (    (    sB   /usr/lib/python2.7/site-packages/kitchen/collections/strictdict.pyt   keysQ   s    c         C   s   t  j |  t | ƒ | f ƒ S(   N(   R    t   __contains__R   (   R   R   (    (    sB   /usr/lib/python2.7/site-packages/kitchen/collections/strictdict.pyR
   T   s    (
   t   __name__t
   __module__t   __doc__R   R   R   R	   t   iterkeysR   R
   (    (    (    sB   /usr/lib/python2.7/site-packages/kitchen/collections/strictdict.pyR   )   s   					N(   R   (   R   t   collectionsR    t   ImportErrort   kitchen.pycompat25.collectionsR   t   __all__(    (    (    sB   /usr/lib/python2.7/site-packages/kitchen/collections/strictdict.pyt   <module>   s   
.
 OHA YOOOO