ó
ÓËŜKc           @   s  d  Z  d d l m Z d e f d     YZ d e f d     YZ d e f d     YZ d	 e f d
     YZ d e e f d     YZ d e f d     YZ d e f d     YZ	 d e f d     YZ
 d e f d     YZ d e
 e e	 e f d     YZ d S(   sJ   Mapping Interfaces

$Id: mapping.py 110536 2010-04-06 02:59:44Z tseaver $
i˙˙˙˙(   t	   Interfacet   IItemMappingc           B   s   e  Z d  Z d   Z RS(   s%   Simplest readable mapping object
    c         C   s   d S(   s^   Get a value for a key

        A KeyError is raised if there is no value for the key.
        N(    (   t   key(    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyt   __getitem__   s    (   t   __name__t
   __module__t   __doc__R   (    (    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyR      s   t   IReadMappingc           B   s#   e  Z d  Z d d  Z d   Z RS(   s   Basic mapping interface
    c         C   s   d S(   sa   Get a value for a key

        The default is returned if there is no value for the key.
        N(    (   R   t   default(    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyt   get#   s    c         C   s   d S(   s$   Tell if a key exists in the mapping.N(    (   R   (    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyt   __contains__)   s    N(   R   R   R   t   NoneR	   R
   (    (    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyR      s   t   IWriteMappingc           B   s    e  Z d  Z d   Z d   Z RS(   s!   Mapping methods for changing datac         C   s   d S(   s.   Delete a value from the mapping using the key.N(    (   R   (    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyt   __delitem__0   s    c         C   s   d S(   s   Set a new item in the mapping.N(    (   R   t   value(    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyt   __setitem__3   s    (   R   R   R   R   R   (    (    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyR   -   s   	t   IEnumerableMappingc           B   s;   e  Z d  Z d   Z d   Z d   Z d   Z d   Z RS(   s3   Mapping objects whose items can be enumerated.
    c           C   s   d S(   s/   Return the keys of the mapping object.
        N(    (    (    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyt   keys;   s    c           C   s   d S(   s?   Return an iterator for the keys of the mapping object.
        N(    (    (    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyt   __iter__?   s    c           C   s   d S(   s1   Return the values of the mapping object.
        N(    (    (    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyt   valuesC   s    c           C   s   d S(   s0   Return the items of the mapping object.
        N(    (    (    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyt   itemsG   s    c           C   s   d S(   s$   Return the number of items.
        N(    (    (    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyt   __len__K   s    (   R   R   R   R   R   R   R   R   (    (    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyR   7   s   				t   IMappingc           B   s   e  Z d  Z RS(   s    Simple mapping interface (   R   R   R   (    (    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyR   O   s   t   IIterableMappingc           B   s#   e  Z d    Z d   Z d   Z RS(   c           C   s   d S(   s)   iterate over keys; equivalent to __iter__N(    (    (    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyt   iterkeysT   s    c           C   s   d S(   s   iterate over valuesN(    (    (    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyt
   itervaluesW   s    c           C   s   d S(   s   iterate over itemsN(    (    (    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyt	   iteritemsZ   s    (   R   R   R   R   R   (    (    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyR   R   s   		t   IClonableMappingc           B   s   e  Z d    Z RS(   c           C   s   d S(   s   return copy of dictN(    (    (    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyt   copy_   s    (   R   R   R   (    (    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyR   ]   s   t   IExtendedReadMappingc           B   s   e  Z d    Z RS(   c         C   s   d S(   s?   Tell if a key exists in the mapping; equivalent to __contains__N(    (   R   (    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyt   has_keyd   s    (   R   R   R   (    (    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyR   b   s   t   IExtendedWriteMappingc           B   s8   e  Z d    Z d   Z d d  Z d   Z d   Z RS(   c           C   s   d S(   s   delete all itemsN(    (    (    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyt   cleari   s    c         C   s   d S(   s0    Update D from E: for k in E.keys(): D[k] = E[k]N(    (   t   d(    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyt   updatel   s    c         C   s   d S(   s@   D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in DN(    (   R   R   (    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyt
   setdefaulto   s    c         G   s   d S(   sâ   remove specified key and return the corresponding value
        *args may contain a single default value, or may not be supplied.
        If key is not found, default is returned if given, otherwise 
        KeyError is raisedN(    (   t   kt   args(    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyt   popr   s    c           C   s   d S(   se   remove and return some (key, value) pair as a
        2-tuple; but raise KeyError if mapping is emptyN(    (    (    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyt   popitemx   s    N(   R   R   R    R"   R   R#   R&   R'   (    (    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyR   g   s
   			t   IFullMappingc           B   s   e  Z d  Z RS(   s    Full mapping interface (   R   R   R   (    (    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyR(   |   s   N(   R   t   zope.interfaceR    R   R   R   R   R   R   R   R   R   R(   (    (    (    sA   /usr/lib/python2.7/dist-packages/zope/interface/common/mapping.pyt   <module>   s   
