HOME


Mini Shell 1.0
Redirecting to https://devs.lapieza.net/iniciar-sesion Redirecting to https://devs.lapieza.net/iniciar-sesion.
DIR: /lib/python3/dist-packages/zope/interface/common/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/zope/interface/common/__pycache__/mapping.cpython-311.pyc
�

JDvcR�	�r�dZddlmZddlmZddlmZGd�de��ZGd�dej	e��Z
Gd	�d
e��ZGd�deje
��Z
Gd
�dee
��ZGd�de
��ZGd�de��ZGd�de��ZGd�de��ZGd�dejeeee��ZdS)ah
Mapping Interfaces.

Importing this module does *not* mark any standard classes as
implementing any of these interfaces.

While this module is not deprecated, new code should generally use
:mod:`zope.interface.common.collections`, specifically
:class:`~zope.interface.common.collections.IMapping` and
:class:`~zope.interface.common.collections.IMutableMapping`. This
module is occasionally useful for its extremely fine grained breakdown
of interfaces.

The standard library :class:`dict` and :class:`collections.UserDict`
implement ``IMutableMapping``, but *do not* implement any of the
interfaces in this module.
�)�	Interface)�PYTHON2)�collectionsc��eZdZdZd�ZdS)�IItemMappingz%Simplest readable mapping object
    c��dS)z`Get a value for a key

        A `KeyError` is raised if there is no value for the key.
        N���keys �?/usr/lib/python3/dist-packages/zope/interface/common/mapping.py�__getitem__zIItemMapping.__getitem__'�����N)�__name__�
__module__�__qualname__�__doc__r
r	rrrr#s-������������rrc� �eZdZdZdd�Zd�ZdS)�IReadMappingz^
    Basic mapping interface.

    .. versionchanged:: 5.0.0
       Extend ``IContainer``
    Nc��dS)zaGet a value for a key

        The default is returned if there is no value for the key.
        Nr	�r�defaults  r�getzIReadMapping.get6rrc��dS)z$Tell if a key exists in the mapping.Nr	r
s r�__contains__zIReadMapping.__contains__<rr�N)rrrrrrr	rrrr.sA������������3�3�3�3�3rrc��eZdZdZd�Zd�ZdS)�
IWriteMappingz!Mapping methods for changing datac��dS)z.Delete a value from the mapping using the key.Nr	r
s r�__delitem__zIWriteMapping.__delitem__Drrc��dS)zSet a new item in the mapping.Nr	)r�values  r�__setitem__zIWriteMapping.__setitem__GrrN)rrrrr r#r	rrrrAs8������+�+�=�=�=�-�-�-�-�-rrc�*�eZdZdZd�Zd�Zd�Zd�ZdS)�IEnumerableMappingzp
    Mapping objects whose items can be enumerated.

    .. versionchanged:: 5.0.0
       Extend ``ISized``
    c��dS)z/Return the keys of the mapping object.
        Nr	r	rr�keyszIEnumerableMapping.keysSrrc��dS)z?Return an iterator for the keys of the mapping object.
        Nr	r	rr�__iter__zIEnumerableMapping.__iter__Wrrc��dS)z1Return the values of the mapping object.
        Nr	r	rr�valueszIEnumerableMapping.values[rrc��dS)z0Return the items of the mapping object.
        Nr	r	rr�itemszIEnumerableMapping.items_rrN)rrrrr'r)r+r-r	rrr%r%KsZ���������������������rr%c��eZdZdZdS)�IMappingz Simple mapping interface N�rrrrr	rrr/r/cs������$�$�$�$rr/c�,�eZdZdZerd�Zd�Zd�ZdSdS)�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.
    c��dS)z-iterate over keys; equivalent to ``__iter__``Nr	r	rr�iterkeyszIIterableMapping.iterkeysprrc��dS)ziterate over valuesNr	r	rr�
itervalueszIIterableMapping.itervaluessrrc��dS)ziterate over itemsNr	r	rr�	iteritemszIIterableMapping.iteritemsvrrN)rrrr�PY2r4r6r8r	rrr2r2fs_���������!�	<�	<�	<�	"�	"�	"�	!�	!�	!�	!�	!�!�!rr2c��eZdZdZd�ZdS)�IClonableMappingzSSomething that can produce a copy of itself.

    This is available in `dict`.
    c��dS)zreturn copy of dictNr	r	rr�copyzIClonableMapping.copyrrN)rrrrr=r	rrr;r;ys-��������
����rr;c� �eZdZdZerd�ZdSdS)�IExtendedReadMappingz�
    Something with a particular method equivalent to ``__contains__``.

    On Python 2, `dict` provides this method, but it was removed
    in Python 3.
    c��dS)zCTell if a key exists in the mapping; equivalent to ``__contains__``Nr	r
s r�has_keyzIExtendedReadMapping.has_key�rrN)rrrrr9rAr	rrr?r?�sI���������V�	V�	V�	V�	V�	V�V�Vrr?c�4�eZdZdZd�Zd�Zdd�Zdd�Zd�ZdS)	�IExtendedWriteMappingzHAdditional mutation methods.

    These are all provided by `dict`.
    c��dS)zdelete all itemsNr	r	rr�clearzIExtendedWriteMapping.clear�rrc��dS)z0 Update D from E: for k in E.keys(): D[k] = E[k]Nr	)�ds r�updatezIExtendedWriteMapping.update�rrNc��dS)z@D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in DNr	rs  r�
setdefaultz IExtendedWriteMapping.setdefault�rrc��dS)a
        pop(k[,default]) -> value

        Remove specified key and return the corresponding value.

        If key is not found, *default* is returned if given, otherwise
        `KeyError` is raised. Note that *default* must not be passed by
        name.
        Nr	)�krs  r�popzIExtendedWriteMapping.pop�rrc��dS)zeremove and return some (key, value) pair as a
        2-tuple; but raise KeyError if mapping is emptyNr	r	rr�popitemzIExtendedWriteMapping.popitem�rrr)	rrrrrErHrJrMrOr	rrrCrC�sw��������
���;�;�;�K�K�K�K�	�	�	�	�;�;�;�;�;rrCc��eZdZdZdS)�IFullMappinga$
    Full mapping interface.

    Most uses of this interface should instead use
    :class:`~zope.interface.commons.collections.IMutableMapping` (one of the
    bases of this interface). The required methods are the same.

    .. versionchanged:: 5.0.0
       Extend ``IMutableMapping``
    Nr0r	rrrQrQ�s������	�	�	�	rrQN)r�zope.interfacer�zope.interface._compatrr9�zope.interface.commonrr�
IContainerrr�ISizedr%r/r2r;r?rC�IMutableMappingrQr	rr�<module>rXs����"%�$�$�$�$�$�1�1�1�1�1�1�-�-�-�-�-�-������9����3�3�3�3�3�;�)�<�3�3�3�&-�-�-�-�-�I�-�-�-�������+�\����0%�%�%�%�%�}�0�%�%�%�!�!�!�!�!�)�!�!�!�&�����y����
V�
V�
V�
V�
V�+�
V�
V�
V�;�;�;�;�;�M�;�;�;�<������#��3�5E�x�����r