%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3/dist-packages/zope/interface/common/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3/dist-packages/zope/interface/common/__pycache__/sequence.cpython-312.pyc

�

��e����dZdZddlmZddlmZGd�dej�ZGd�deje�Z	Gd	�d
eje	�ZGd�de�ZGd
�de�Z
Gd�de
�ZGd�dee�Zy)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)�collectionsc��eZdZdZd�Zy)�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��y)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__3���N)�__name__�
__module__�__qualname__�__doc__r
r	rrrr$s���#rrc��eZdZdZy)�IFiniteSequencez[
    A sequence of bound size.

    .. versionchanged:: 5.0.0
       Extend ``ISized``
    N�rrrrr	rrrr9s��rrc�L�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
y)
�
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��y)z'``x.__contains__(item) <==> item in x``Nr	��items r�__contains__zIReadSequence.__contains__Nrrc��y)z"``x.__lt__(other) <==> x < other``Nr	��others r�__lt__zIReadSequence.__lt__Rrrc��y)z#``x.__le__(other) <==> x <= other``Nr	rs r�__le__zIReadSequence.__le__Urrc��y)z#``x.__eq__(other) <==> x == other``Nr	rs r�__eq__zIReadSequence.__eq__Xrrc��y)z#``x.__ne__(other) <==> x != other``Nr	rs r�__ne__zIReadSequence.__ne__[rrc��y)z"``x.__gt__(other) <==> x > other``Nr	rs r�__gt__zIReadSequence.__gt__^rrc��y)z#``x.__ge__(other) <==> x >= other``Nr	rs r�__ge__zIReadSequence.__ge__arrc��y)z#``x.__add__(other) <==> x + other``Nr	rs r�__add__zIReadSequence.__add__drrc��y)z``x.__mul__(n) <==> x * n``Nr	��ns r�__mul__zIReadSequence.__mul__grrc��y)z``x.__rmul__(n) <==> n * x``Nr	r.s r�__rmul__zIReadSequence.__rmul__jrrN)rrrrrr r"r$r&r(r*r,r0r2r	rrrrAs9��
�6�1�2�2�2�1�2�2�*�+rrc��eZdZdZd�Zd�Zy)�IExtendedReadSequencezFull read interface for listsc��y)z%Return number of occurrences of valueNr	rs r�countzIExtendedReadSequence.countqrrc��y)zTindex(value, [start, [stop]]) -> int

        Return first index of *value*
        Nr	)r�argss  rrzIExtendedReadSequence.indextrrN)rrrrr6rr	rrr4r4ns��'�4�rr4c�P�eZdZdZd�Zd�Zd�Zd�Zd�Zd
d�Z	d�Z
d	�Zdd�Zd�Z
y
)�IUniqueMemberWriteSequencezAThe write contract for a sequence that may enforce unique membersc��y)z�``x.__setitem__(index, item) <==> x[index] = item``

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

        Declaring this interface does not specify whether `__delitem__`
        supports slice objects.
        Nr	r
s r�__delitem__z&IUniqueMemberWriteSequence.__delitem__�rrc��y)z``x.__iadd__(y) <==> x += y``Nr	)�ys r�__iadd__z#IUniqueMemberWriteSequence.__iadd__�rrc��y)zAppend item to endNr	rs r�appendz!IUniqueMemberWriteSequence.append�rrc��y)zInsert item before indexNr	r<s  r�insertz!IUniqueMemberWriteSequence.insert�rrc��y)z.Remove and return item at index (default last)Nr	r
s r�popzIUniqueMemberWriteSequence.pop�rrc��y)z Remove first occurrence of valueNr	rs r�removez!IUniqueMemberWriteSequence.remove�rrc��y)zReverse *IN PLACE*Nr	r	rr�reversez"IUniqueMemberWriteSequence.reverse�rrNc��y)z3Stable sort *IN PLACE*; `cmpfunc(x, y)` -> -1, 0, 1Nr	)�cmpfuncs r�sortzIUniqueMemberWriteSequence.sort�rrc��y)z3Extend list by appending elements from the iterableNr	)�iterables r�extendz!IUniqueMemberWriteSequence.extend�rr)���)N)rrrrr=r?rBrDrFrHrJrLrOrRr	rrr:r:zs9��K���,�!�'�=�/�!�B�Brr:c��eZdZdZd�Zy)�IWriteSequencez!Full write contract for sequencesc��y)z``x.__imul__(n) <==> x *= n``Nr	r.s r�__imul__zIWriteSequence.__imul__�rrN)rrrrrWr	rrrUrU�s
��+�,rrUc��eZdZdZy)�	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rYrY�s��rrYN)r�
__docformat__�zope.interfacer�zope.interface.commonr�	IIterabler�ISizedr�
IContainerrr4r:rUrYr	rr�<module>r`s����$#�
�$�-�#�{�,�,�#�*�k�(�(�*:��*+�K�*�*�O�*+�Z
�M�
�'B��'B�R,�/�,��
�~�r

Zerion Mini Shell 1.0