HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib/python3/dist-packages/zope/interface/common/__pycache__/mapping.cpython-38.pyc
U

ؒ�]�@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/lib/python3/dist-packages/zope/interface/common/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.Nrrrrr�__contains__*szIReadMapping.__contains__)N)r	r
rrrrrrrrr
 s
r
c@s eZdZdZdd�Zdd�ZdS)�
IWriteMappingz!Mapping methods for changing datacCsdS)z.Delete a value from the mapping using the key.Nrrrrr�__delitem__1szIWriteMapping.__delitem__cCsdS)zSet a new item in the mapping.Nr)r�valuerrr�__setitem__4szIWriteMapping.__setitem__N)r	r
rrrrrrrrr.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)	r	r
rrrrrrrrrrrr8src@seZdZdZdS)�IMappingz Simple mapping interface N�r	r
rrrrrrrPsrc@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)r	r
rrrr r!rrrrrSsrc@seZdZdZdd�ZdS)�IClonableMappingzSSomething that can produce a copy of itself.

    This is available in `dict`.
    cCsdS)zreturn copy of dictNrrrrr�copykszIClonableMapping.copyN)r	r
rrr#rrrrr"esr"c@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__``Nrrrrr�has_keyvszIExtendedReadMapping.has_keyN)r	r
rrr%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 DNrrrrr�
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)	r	r
rrr'r)r*r-r.rrrrr&ys
r&c@seZdZdZdS)�IFullMappingz Full mapping interface Nrrrrrr/�sr/N)
rZzope.interfacerrr
rrrrr"r$r&r/rrrr�<module>s 
	
�