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__/sequence.cpython-311.pyc
�

JDvc����dZdZddlmZddlmZddlmZGd�dej	��Z
Gd�d	eje
��ZGd
�dej
e��ZGd�d
e��ZGd�de��ZGd�de��ZGd�dee��ZdS)a�
Sequence 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.ISequence` and
:class:`~zope.interface.common.collections.IMutableSequence`. This
module is occasionally useful for its fine-grained breakdown of interfaces.

The standard library :class:`list`, :class:`tuple` and
:class:`collections.UserList`, among others, implement ``ISequence``
or ``IMutableSequence`` but *do not* implement any of the interfaces
in this module.
�restructuredtext�)�	Interface)�collections)�PYTHON2c��eZdZdZd�ZdS)�IMinimalSequencea�Most basic sequence interface.

    All sequences are iterable.  This requires at least one of the
    following:

    - a `__getitem__()` method that takes a single argument; integer
      values starting at 0 must be supported, and `IndexError` should
      be raised for the first index for which there is no value, or

    - an `__iter__()` method that returns an iterator as defined in
      the Python documentation (http://docs.python.org/lib/typeiter.html).

    c��dS)z�``x.__getitem__(index) <==> x[index]``

        Declaring this interface does not specify whether `__getitem__`
        supports slice objects.N���indexs �@/usr/lib/python3/dist-packages/zope/interface/common/sequence.py�__getitem__zIMinimalSequence.__getitem__4�����N)�__name__�
__module__�__qualname__�__doc__rr
rr
rr%s-��������#�#�#�#�#rrc��eZdZdZdS)�IFiniteSequencez[
    A sequence of bound size.

    .. versionchanged:: 5.0.0
       Extend ``ISized``
    N�rrrrr
rr
rr:s���������rrc�\�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
erd�Zd
Sd
S)�
IReadSequencea.
    read interface shared by tuple and list

    This interface is similar to
    :class:`~zope.interface.common.collections.ISequence`, but
    requires that all instances be totally ordered. Most users
    should prefer ``ISequence``.

    .. versionchanged:: 5.0.0
       Extend ``IContainer``
    c��dS)z'``x.__contains__(item) <==> item in x``Nr
��items r
�__contains__zIReadSequence.__contains__Orrc��dS)z"``x.__lt__(other) <==> x < other``Nr
��others r
�__lt__zIReadSequence.__lt__Srrc��dS)z#``x.__le__(other) <==> x <= other``Nr
rs r
�__le__zIReadSequence.__le__Vrrc��dS)z#``x.__eq__(other) <==> x == other``Nr
rs r
�__eq__zIReadSequence.__eq__Yrrc��dS)z#``x.__ne__(other) <==> x != other``Nr
rs r
�__ne__zIReadSequence.__ne__\rrc��dS)z"``x.__gt__(other) <==> x > other``Nr
rs r
�__gt__zIReadSequence.__gt___rrc��dS)z#``x.__ge__(other) <==> x >= other``Nr
rs r
�__ge__zIReadSequence.__ge__brrc��dS)z#``x.__add__(other) <==> x + other``Nr
rs r
�__add__zIReadSequence.__add__errc��dS)z``x.__mul__(n) <==> x * n``Nr
��ns r
�__mul__zIReadSequence.__mul__hrrc��dS)z``x.__rmul__(n) <==> n * x``Nr
r/s r
�__rmul__zIReadSequence.__rmul__krrc��dS)z�``x.__getslice__(i, j) <==> x[i:j]``

            Use of negative indices is not supported.

            Deprecated since Python 2.0 but still a part of `UserList`.
            Nr
��i�js  r
�__getslice__zIReadSequence.__getslice__orrN)rrrrrr!r#r%r'r)r+r-r1r3�PY2r8r
rr
rrBs�������
�
�6�6�6�1�1�1�2�2�2�2�2�2�2�2�2�1�1�1�2�2�2�2�2�2�*�*�*�+�+�+���	�	�	�	�	��rrc��eZdZdZd�Zd�ZdS)�IExtendedReadSequencezFull read interface for listsc��dS)z%Return number of occurrences of valueNr
rs r
�countzIExtendedReadSequence.countzrrc��dS)zTindex(value, [start, [stop]]) -> int

        Return first index of *value*
        Nr
)r�argss  r
rzIExtendedReadSequence.index}rrN)rrrrr=rr
rr
r;r;ws8������'�'�4�4�4�����rr;c�b�eZdZdZd�Zd�Zerd�Zd�Zd�Z	d�Z
d�Zdd
�Zd�Z
d�Zdd�Zd�Zd
S)�IUniqueMemberWriteSequencezAThe write contract for a sequence that may enforce unique membersc��dS)z�``x.__setitem__(index, item) <==> x[index] = item``

        Declaring this interface does not specify whether `__setitem__`
        supports slice objects.
        Nr
�rrs  r
�__setitem__z&IUniqueMemberWriteSequence.__setitem__�rrc��dS)z�``x.__delitem__(index) <==> del x[index]``

        Declaring this interface does not specify whether `__delitem__`
        supports slice objects.
        Nr
rs r
�__delitem__z&IUniqueMemberWriteSequence.__delitem__�rrc��dS)z�``x.__setslice__(i, j, other) <==> x[i:j] = other``

            Use of negative indices is not supported.

            Deprecated since Python 2.0 but still a part of `UserList`.
            Nr
)r6r7r s   r
�__setslice__z'IUniqueMemberWriteSequence.__setslice__�rrc��dS)z�``x.__delslice__(i, j) <==> del x[i:j]``

            Use of negative indices is not supported.

            Deprecated since Python 2.0 but still a part of `UserList`.
            Nr
r5s  r
�__delslice__z'IUniqueMemberWriteSequence.__delslice__�rrc��dS)z``x.__iadd__(y) <==> x += y``Nr
)�ys r
�__iadd__z#IUniqueMemberWriteSequence.__iadd__�rrc��dS)zAppend item to endNr
rs r
�appendz!IUniqueMemberWriteSequence.append�rrc��dS)zInsert item before indexNr
rCs  r
�insertz!IUniqueMemberWriteSequence.insert�rr���c��dS)z.Remove and return item at index (default last)Nr
rs r
�popzIUniqueMemberWriteSequence.pop�rrc��dS)z Remove first occurrence of valueNr
rs r
�removez!IUniqueMemberWriteSequence.remove�rrc��dS)zReverse *IN PLACE*Nr
r
rr
�reversez"IUniqueMemberWriteSequence.reverse�rrNc��dS)z3Stable sort *IN PLACE*; `cmpfunc(x, y)` -> -1, 0, 1Nr
)�cmpfuncs r
�sortzIUniqueMemberWriteSequence.sort�rrc��dS)z3Extend list by appending elements from the iterableNr
)�iterables r
�extendz!IUniqueMemberWriteSequence.extend�rr)rR)N)rrrrrDrFr9rHrJrMrOrQrTrVrXr[r^r
rr
rArA�s�������K�K���������	�	�	�	�	�	�,�,�,�!�!�!�'�'�'�=�=�=�=�/�/�/�!�!�!�B�B�B�B�B�B�B�B�BrrAc��eZdZdZd�ZdS)�IWriteSequencez!Full write contract for sequencesc��dS)z``x.__imul__(n) <==> x *= n``Nr
r/s r
�__imul__zIWriteSequence.__imul__�rrN)rrrrrbr
rr
r`r`�s)������+�+�,�,�,�,�,rr`c��eZdZdZdS)�	ISequencea�
    Full sequence contract.

    New code should prefer
    :class:`~zope.interface.common.collections.IMutableSequence`.

    Compared to that interface, which is implemented by :class:`list`
    (:class:`~zope.interface.common.builtins.IList`), among others,
    this interface is missing the following methods:

        - clear

        - count

        - index

    This interface adds the following methods:

        - sort
    Nrr
rr
rdrd�s���������rrdN)r�
__docformat__�zope.interfacer�zope.interface.commonr�zope.interface._compatrr9�	IIterabler�ISizedr�
IContainerrr;rAr`rdr
rr
�<module>rls�����$#�
�$�$�$�$�$�$�-�-�-�-�-�-�1�1�1�1�1�1�#�#�#�#�#�{�,�#�#�#�*�����k�(�*:����3�3�3�3�3�K�*�O�3�3�3�j
�
�
�
�
�M�
�
�
�8B�8B�8B�8B�8B��8B�8B�8B�t,�,�,�,�,�/�,�,�,������
�~�����r