Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/zope/interface/common/__pycache__/sequence.cpython-39.pyc
Ðазад
a i�h� � @ s� d Z dZddlmZ ddlmZ G dd� dej�ZG dd� deje�Z G d d � d ej e �ZG dd� de�ZG d d� de�Z G 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)�collectionsc @ s 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 s dS )z�``x.__getitem__(index) <==> x[index]`` Declaring this interface does not specify whether `__getitem__` supports slice objects.N� ��indexr r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/zope/interface/common/sequence.py�__getitem__4 s zIMinimalSequence.__getitem__N)�__name__� __module__�__qualname__�__doc__r r r r r r % s r c @ s 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 ; s r c @ s` e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� Zdd � Z dd� Z dd� Zdd� Zdd� Z 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 s dS )z'``x.__contains__(item) <==> item in x``Nr ��itemr r r �__contains__Q s zIReadSequence.__contains__c C s dS )z"``x.__lt__(other) <==> x < other``Nr ��otherr r r �__lt__U s zIReadSequence.__lt__c C s dS )z#``x.__le__(other) <==> x <= other``Nr r r r r �__le__X s zIReadSequence.__le__c C s dS )z#``x.__eq__(other) <==> x == other``Nr r r r r �__eq__[ s zIReadSequence.__eq__c C s dS )z#``x.__ne__(other) <==> x != other``Nr r r r r �__ne__^ s zIReadSequence.__ne__c C s dS )z"``x.__gt__(other) <==> x > other``Nr r r r r �__gt__a s zIReadSequence.__gt__c C s dS )z#``x.__ge__(other) <==> x >= other``Nr r r r r �__ge__d s zIReadSequence.__ge__c C s dS )z#``x.__add__(other) <==> x + other``Nr r r r r �__add__g s zIReadSequence.__add__c C s dS )z``x.__mul__(n) <==> x * n``Nr ��nr r r �__mul__j s zIReadSequence.__mul__c C s dS )z``x.__rmul__(n) <==> n * x``Nr r r r r �__rmul__m s zIReadSequence.__rmul__N)r r r r r r r r r r r r r r! r r r r r D s r c @ s e Zd ZdZdd� Zdd� ZdS )�IExtendedReadSequencezFull read interface for listsc C s dS )z%Return number of occurrences of valueNr r r r r �countt s zIExtendedReadSequence.countc G s dS )zTindex(value, [start, [stop]]) -> int Return first index of *value* Nr )r �argsr r r r w s zIExtendedReadSequence.indexN)r r r r r# r r r r r r"