File: //usr/lib/python3/dist-packages/zope/interface/common/__pycache__/sequence.cpython-310.pyc
o
$
x`� � @ s� d Z dZddlmZ ddlmZ ddlmZ G dd� dej �Z
G dd � d eje
�ZG d
d� dej
e�ZG dd
� d
e�ZG dd� de�ZG dd� de�ZG dd� 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 @ � e Zd ZdZdd� 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 C � dS )z�``x.__getitem__(index) <==> x[index]``
Declaring this interface does not specify whether `__getitem__`
supports slice objects.N� ��indexr r �@/usr/lib/python3/dist-packages/zope/interface/common/sequence.py�__getitem__4 � zIMinimalSequence.__getitem__N)�__name__�
__module__�__qualname__�__doc__r
r r r r r % s r c @ � e Zd ZdZdS )�IFiniteSequencez[
A sequence of bound size.
.. versionchanged:: 5.0.0
Extend ``ISized``
N�r r r r r r r r r : � r c @ sp e Zd ZdZdd� Zdd� Zdd� Zdd � Zd
d� Zdd
� Z dd� Z
dd� Zdd� Zdd� Z
er6dd� ZdS dS )�
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 C r )z'``x.__contains__(item) <==> item in x``Nr ��itemr r r �__contains__O r zIReadSequence.__contains__c C r )z"``x.__lt__(other) <==> x < other``Nr ��otherr r r �__lt__S r zIReadSequence.__lt__c C r )z#``x.__le__(other) <==> x <= other``Nr r r r r �__le__V r zIReadSequence.__le__c C r )z#``x.__eq__(other) <==> x == other``Nr r r r r �__eq__Y r zIReadSequence.__eq__c C r )z#``x.__ne__(other) <==> x != other``Nr r r r r �__ne__\ r zIReadSequence.__ne__c C r )z"``x.__gt__(other) <==> x > other``Nr r r r r �__gt___ r zIReadSequence.__gt__c C r )z#``x.__ge__(other) <==> x >= other``Nr r r r r �__ge__b r zIReadSequence.__ge__c C r )z#``x.__add__(other) <==> x + other``Nr r r r r �__add__e r zIReadSequence.__add__c C r )z``x.__mul__(n) <==> x * n``Nr ��nr r r �__mul__h r zIReadSequence.__mul__c C r )z``x.__rmul__(n) <==> n * x``Nr r$ r r r �__rmul__k r zIReadSequence.__rmul__c C r )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�jr r r �__getslice__o r zIReadSequence.__getslice__N)r r r r r r r r r r! r"