Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/zope/interface/common/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pyc


Kc@sdZdZddlmZdejfdYZdefdYZdefd	YZd
efdYZdejfd
YZ	de	fdYZ
dee
fdYZdS(sLSequence Interfaces

$Id: sequence.py 110536 2010-04-06 02:59:44Z tseaver $
trestructuredtexti(t	interfacetIMinimalSequencecBseZdZdZRS(sMost basic sequence interface.

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

    - a `__getitem__()` method that takes a single argument; interger
      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).

    cCsdS(s`x.__getitem__(index)` <==> `x[index]`

        Declaring this interface does not specify whether `__getitem__`
        supports slice objects.N((tindex((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pyt__getitem__$s(t__name__t
__module__t__doc__R(((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pyRs
tIFiniteSequencecBseZdZRS(cCsdS(s`x.__len__()` <==> `len(x)`N((((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pyt__len__,s(RRR	(((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pyR*st
IReadSequencecBsqeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
RS(s'read interface shared by tuple and listcCsdS(s'`x.__contains__(item)` <==> `item in x`N((titem((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pyt__contains__2scCsdS(s"`x.__lt__(other)` <==> `x < other`N((tother((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pyt__lt__5scCsdS(s#`x.__le__(other)` <==> `x <= other`N((R
((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pyt__le__8scCsdS(s#`x.__eq__(other)` <==> `x == other`N((R
((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pyt__eq__;scCsdS(s#`x.__ne__(other)` <==> `x != other`N((R
((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pyt__ne__>scCsdS(s"`x.__gt__(other)` <==> `x > other`N((R
((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pyt__gt__AscCsdS(s#`x.__ge__(other)` <==> `x >= other`N((R
((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pyt__ge__DscCsdS(s#`x.__add__(other)` <==> `x + other`N((R
((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pyt__add__GscCsdS(s`x.__mul__(n)` <==> `x * n`N((tn((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pyt__mul__JscCsdS(s`x.__rmul__(n)` <==> `n * x`N((R((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pyt__rmul__MscCsdS(s`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`.
        N((titj((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pyt__getslice__Ps(RRRRRRRRRRRRRR(((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pyR
/s										tIExtendedReadSequencecBs eZdZdZdZRS(sFull read interface for listscCsdS(s%Return number of occurrences of valueN((R((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pytcount[scGsdS(sQReturn first index of value

        `L.index(value, [start, [stop]])` -> integerN((Rtargs((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pyR^s(RRRRR(((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pyRXs	tIUniqueMemberWriteSequencecBseZdZdZdZdZdZdZdZdZ	dd	Z
d
ZdZddZd
ZRS(sAThe write contract for a sequence that may enforce unique memberscCsdS(s`x.__setitem__(index, item)` <==> `x[index] = item`

        Declaring this interface does not specify whether `__setitem__`
        supports slice objects.
        N((RR((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pyt__setitem__fscCsdS(s`x.__delitem__(index)` <==> `del x[index]`

        Declaring this interface does not specify whether `__delitem__`
        supports slice objects.
        N((R((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pyt__delitem__mscCsdS(s`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`.
        N((RRR
((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pyt__setslice__tscCsdS(s`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`.
        N((RR((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pyt__delslice__|scCsdS(s`x.__iadd__(y)` <==> `x += y`N((ty((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pyt__iadd__scCsdS(sAppend item to endN((R((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pytappendscCsdS(sInsert item before indexN((RR((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pytinsertsicCsdS(s.Remove and return item at index (default last)N((R((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pytpopscCsdS(s Remove first occurrence of valueN((R((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pytremovescCsdS(sReverse *IN PLACE*N((((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pytreversescCsdS(s3Stable sort *IN PLACE*; `cmpfunc(x, y)` -> -1, 0, 1N((tcmpfunc((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pytsortscCsdS(s3Extend list by appending elements from the iterableN((titerable((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pytextendsN(RRRRR R!R"R$R%R&R'R(R)tNoneR+R-(((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pyRcs									tIWriteSequencecBseZdZdZRS(s!Full write contract for sequencescCsdS(s`x.__imul__(n)` <==> `x *= n`N((R((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pyt__imul__s(RRRR0(((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pyR/st	ISequencecBseZdZRS(sFull sequence contract(RRR(((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pyR1sN(Rt
__docformat__tzopeRt	InterfaceRRR
RRR/R1(((sB/usr/lib/python2.7/dist-packages/zope/interface/common/sequence.pyt<module>s)8