ok

Mini Shell

Direktori : /lib64/python3.6/site-packages/zope/interface/common/__pycache__/
Upload File :
Current File : //lib64/python3.6/site-packages/zope/interface/common/__pycache__/mapping.cpython-36.pyc

3

��[�@s�dZddlmZGdd�de�ZGdd�de�ZGdd�de�ZGd	d
�d
e�ZGdd�dee�ZGd
d�de�ZGdd�de�Z	Gdd�de�Z
Gdd�de�ZGdd�de
ee	e�ZdS)zyMapping Interfaces.

Importing this module does *not* mark any standard classes
as implementing any of these interfaces.
�)�	Interfacec@seZdZdZdd�ZdS)�IItemMappingz%Simplest readable mapping object
    cCsdS)z`Get a value for a key

        A `KeyError` is raised if there is no value for the key.
        N�)�keyrr�/usr/lib64/python3.6/mapping.py�__getitem__szIItemMapping.__getitem__N)�__name__�
__module__�__qualname__�__doc__rrrrrrsrc@s"eZdZdZddd�Zdd�ZdS)�IReadMappingzBasic mapping interface
    NcCsdS)zaGet a value for a key

        The default is returned if there is no value for the key.
        Nr)r�defaultrrr�get$szIReadMapping.getcCsdS)z$Tell if a key exists in the mapping.Nr)rrrr�__contains__*szIReadMapping.__contains__)N)rr	r
rrrrrrrr s
rc@s eZdZdZdd�Zdd�ZdS)�
IWriteMappingz!Mapping methods for changing datacCsdS)z.Delete a value from the mapping using the key.Nr)rrrr�__delitem__1szIWriteMapping.__delitem__cCsdS)zSet a new item in the mapping.Nr)r�valuerrr�__setitem__4szIWriteMapping.__setitem__N)rr	r
rrrrrrrr.src@s8eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�ZdS)
�IEnumerableMappingz3Mapping objects whose items can be enumerated.
    cCsdS)z/Return the keys of the mapping object.
        Nrrrrr�keys<szIEnumerableMapping.keyscCsdS)z?Return an iterator for the keys of the mapping object.
        Nrrrrr�__iter__@szIEnumerableMapping.__iter__cCsdS)z1Return the values of the mapping object.
        Nrrrrr�valuesDszIEnumerableMapping.valuescCsdS)z0Return the items of the mapping object.
        Nrrrrr�itemsHszIEnumerableMapping.itemscCsdS)z$Return the number of items.
        Nrrrrr�__len__LszIEnumerableMapping.__len__N)	rr	r
rrrrrrrrrrr8src@seZdZdZdS)�IMappingz Simple mapping interface N)rr	r
rrrrrrPsrc@s(eZdZdZdd�Zdd�Zdd�ZdS)	�IIterableMappingz�A mapping that has distinct methods for iterating
    without copying.

    On Python 2, a `dict` has these methods, but on Python 3
    the methods defined in `IEnumerableMapping` already iterate
    without copying.
    cCsdS)z-iterate over keys; equivalent to ``__iter__``Nrrrrr�iterkeys\szIIterableMapping.iterkeyscCsdS)ziterate over valuesNrrrrr�
itervalues_szIIterableMapping.itervaluescCsdS)ziterate over itemsNrrrrr�	iteritemsbszIIterableMapping.iteritemsN)rr	r
rrrrrrrrrSsrc@seZdZdZdd�ZdS)�IClonableMappingzSSomething that can produce a copy of itself.

    This is available in `dict`.
    cCsdS)zreturn copy of dictNrrrrr�copykszIClonableMapping.copyN)rr	r
rr rrrrresrc@seZdZdZdd�ZdS)�IExtendedReadMappingz�
    Something with a particular method equivalent to ``__contains__``.

    On Python 2, `dict` provides this method, but it was removed
    in Python 3.
    cCsdS)zCTell if a key exists in the mapping; equivalent to ``__contains__``Nr)rrrr�has_keyvszIExtendedReadMapping.has_keyN)rr	r
rr"rrrrr!nsr!c@s:eZdZdZdd�Zdd�Zd
dd�Zd	d
�Zdd�ZdS)�IExtendedWriteMappingzHAdditional mutation methods.

    These are all provided by `dict`.
    cCsdS)zdelete all itemsNrrrrr�clearszIExtendedWriteMapping.clearcCsdS)z0 Update D from E: for k in E.keys(): D[k] = E[k]Nr)�drrr�update�szIExtendedWriteMapping.updateNcCsdS)z@D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in DNr)rr
rrr�
setdefault�sz IExtendedWriteMapping.setdefaultcGsdS)z�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 raisedNr)�k�argsrrr�pop�szIExtendedWriteMapping.popcCsdS)zeremove and return some (key, value) pair as a
        2-tuple; but raise KeyError if mapping is emptyNrrrrr�popitem�szIExtendedWriteMapping.popitem)N)	rr	r
rr$r&r'r*r+rrrrr#ys
r#c@seZdZdZdS)�IFullMappingz Full mapping interface N)rr	r
rrrrrr,�sr,N)
rZzope.interfacerrrrrrrrr!r#r,rrrr�<module>s
	


Zerion Mini Shell 1.0