AlkantarClanX12

Your IP : 18.227.49.73


Current Path : /opt/alt/python35/lib64/python3.5/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/__pycache__/_collections_abc.cpython-35.pyc



��Yf�`�@s�dZddlmZmZddlZdddddd	d
ddd
ddddddddddddgZdZeed��Z	eee
���Zeeij���Z
eeij���Zeeij���Zeeg��Zeeeg���Zeeed���Zeeed:���Zeee���Zeed��Zeef��Zeee���Zeij��Zeij��Zeij��Z eej!�Z"edd ���Z#d!d"�Z$e$�Z$ee$�Z%e$j&�[$Gd#d�dd$e�Z'Gd%d�dd$e�Z(Gd&d�de(�Z)e)j*e%�Gd'd�dd$e�Z+Gd(d�de+�Z,Gd)d	�d	d$e�Z-Gd*d
�d
e-�Z.e.j*e	�e.j*e�e.j*e
�e.j*e�e.j*e�e.j*e�e.j*e�e.j*e�e.j*e�e.j*e�e.j*e�e.j*e�e.j*e�Gd+d�de.�Z/e/j*e#�Gd,d�dd$e�Z0Gd-d
�d
d$e�Z1Gd.d�dd$e�Z2Gd/d�de0e-e1�Z3e3j*e4�Gd0d�de3�Z5e5j*e�Gd1d�de0e-e1�Z6e6j*e"�Gd2d�de0�Z7Gd3d�de7e3�Z8e8j*e�Gd4d�de7e3�Z9e9j*e �Gd5d�de7�Z:e:j*e�Gd6d�de6�Z;e;j*e<�Gd7d�de0e-e1�Z=e=j*e>�e=j*e?�e=j*e�e=j*e@�Gd8d�de=�ZAeAj*eB�eAj*e
�Gd9d�de=�ZCeCj*eD�eCj*e
�dS);zjAbstract Base Classes (ABCs) for collections, according to PEP 3119.

Unit tests are in test_collections.
�)�ABCMeta�abstractmethodN�	Awaitable�	Coroutine�
AsyncIterable�
AsyncIterator�Hashable�Iterable�Iterator�	Generator�Sized�	Container�Callable�Set�
MutableSet�Mapping�MutableMapping�MappingView�KeysView�	ItemsView�
ValuesView�Sequence�MutableSequence�
ByteStringzcollections.abc��i��ccsdVS)N�rrr�5/opt/alt/python35/lib64/python3.5/_collections_abc.py�<lambda>7src�sdS)Nrrrrr�_coro9sr c@s:eZdZfZedd��Zedd��ZdS)rcCsdS)Nrr)�selfrrr�__hash__FszHashable.__hash__cCsE|tkrAx2|jD]'}d|jkr|jdr<dSPqWtS)Nr"T)r�__mro__�__dict__�NotImplemented)�cls�C�Brrr�__subclasshook__Js
zHashable.__subclasshook__N)�__name__�
__module__�__qualname__�	__slots__rr"�classmethodr)rrrrrBs�	metaclassc@s:eZdZfZedd��Zedd��ZdS)rccs	dVdS)Nr)r!rrr�	__await__YszAwaitable.__await__cCsE|tkrAx2|jD]'}d|jkr|jdr<dSPqWtS)Nr0T)rr#r$r%)r&r'r(rrrr)]s
zAwaitable.__subclasshook__N)r*r+r,r-rr0r.r)rrrrrUsc@s^eZdZfZedd��Zedddd��Zdd�Zedd	��Z	dS)
rcCs
t�dS)zcSend a value into the coroutine.
        Return next yielded value or raise StopIteration.
        N)�
StopIteration)r!�valuerrr�sendlszCoroutine.sendNcCsL|dkr'|dkr|�|�}|dk	rB|j|�}|�dS)zgRaise an exception in the coroutine.
        Return next yielded value or raise StopIteration.
        N)�with_traceback)r!�typ�val�tbrrr�throwss	zCoroutine.throwcCs<y|jt�Wnttfk
r+Yn
Xtd��dS)z.Raise GeneratorExit inside coroutine.
        zcoroutine ignored GeneratorExitN)r8�
GeneratorExitr1�RuntimeError)r!rrr�close�s
zCoroutine.closecCsS|tkrO|j}x3dD]+}x"|D]}||jkr)Pq)WtSqWdStS)Nr0r3r8r;T)r0r3r8r;)rr#r$r%)r&r'�mro�method�baserrrr)�s	

zCoroutine.__subclasshook__)
r*r+r,r-rr3r8r;r.r)rrrrrhs
c@s:eZdZfZedd��Zedd��ZdS)rcCst�S)N)r)r!rrr�	__aiter__�szAsyncIterable.__aiter__cCs0|tkr,tdd�|jD��r,dStS)Ncss|]}d|jkVqdS)r?N)r$)�.0r(rrr�	<genexpr>�sz1AsyncIterable.__subclasshook__.<locals>.<genexpr>T)r�anyr#r%)r&r'rrrr)�szAsyncIterable.__subclasshook__N)r*r+r,r-rr?r.r)rrrrr�sc@sFeZdZfZedd��Zdd�Zedd��ZdS)rc�s
t�dS)z@Return the next item or raise StopAsyncIteration when exhausted.N)�StopAsyncIteration)r!rrr�	__anext__�szAsyncIterator.__anext__cCs|S)Nr)r!rrrr?�szAsyncIterator.__aiter__cCsL|tkrHtdd�|jD��rHtdd�|jD��rHdStS)Ncss|]}d|jkVqdS)rDN)r$)r@r(rrrrA�sz1AsyncIterator.__subclasshook__.<locals>.<genexpr>css|]}d|jkVqdS)r?N)r$)r@r(rrrrA�sT)rrBr#r%)r&r'rrrr)�s
zAsyncIterator.__subclasshook__N)	r*r+r,r-rrDr?r.r)rrrrr�sc@s:eZdZfZedd��Zedd��ZdS)r	ccsdS)Nr)r!rrr�__iter__�szIterable.__iter__cCs0|tkr,tdd�|jD��r,dStS)Ncss|]}d|jkVqdS)rEN)r$)r@r(rrrrA�sz,Iterable.__subclasshook__.<locals>.<genexpr>T)r	rBr#r%)r&r'rrrr)�szIterable.__subclasshook__N)r*r+r,r-rrEr.r)rrrrr	�sc@sFeZdZfZedd��Zdd�Zedd��ZdS)r
cCs
t�dS)zKReturn the next item from the iterator. When exhausted, raise StopIterationN)r1)r!rrr�__next__�szIterator.__next__cCs|S)Nr)r!rrrrE�szIterator.__iter__cCsL|tkrHtdd�|jD��rHtdd�|jD��rHdStS)Ncss|]}d|jkVqdS)rFN)r$)r@r(rrrrA�sz,Iterator.__subclasshook__.<locals>.<genexpr>css|]}d|jkVqdS)rEN)r$)r@r(rrrrA�sT)r
rBr#r%)r&r'rrrr)�s
zIterator.__subclasshook__N)	r*r+r,r-rrFrEr.r)rrrrr
�sc@sjeZdZfZdd�Zedd��Zedddd��Zdd	�Ze	d
d��Z
dS)rcCs
|jd�S)z^Return the next item from the generator.
        When exhausted, raise StopIteration.
        N)r3)r!rrrrF�szGenerator.__next__cCs
t�dS)zcSend a value into the generator.
        Return next yielded value or raise StopIteration.
        N)r1)r!r2rrrr3�szGenerator.sendNcCsL|dkr'|dkr|�|�}|dk	rB|j|�}|�dS)zgRaise an exception in the generator.
        Return next yielded value or raise StopIteration.
        N)r4)r!r5r6r7rrrr8s	zGenerator.throwcCs<y|jt�Wnttfk
r+Yn
Xtd��dS)z.Raise GeneratorExit inside generator.
        zgenerator ignored GeneratorExitN)r8r9r1r:)r!rrrr;s
zGenerator.closecCsS|tkrO|j}x3dD]+}x"|D]}||jkr)Pq)WtSqWdStS)NrErFr3r8r;T)rErFr3r8r;)rr#r$r%)r&r'r<r=r>rrrr)s	

zGenerator.__subclasshook__)r*r+r,r-rFrr3r8r;r.r)rrrrr�s
c@s:eZdZfZedd��Zedd��ZdS)rcCsdS)Nrr)r!rrr�__len__2sz
Sized.__len__cCs0|tkr,tdd�|jD��r,dStS)Ncss|]}d|jkVqdS)rGN)r$)r@r(rrrrA9sz)Sized.__subclasshook__.<locals>.<genexpr>T)rrBr#r%)r&r'rrrr)6szSized.__subclasshook__N)r*r+r,r-rrGr.r)rrrrr.sc@s:eZdZfZedd��Zedd��ZdS)r
cCsdS)NFr)r!�xrrr�__contains__BszContainer.__contains__cCs0|tkr,tdd�|jD��r,dStS)Ncss|]}d|jkVqdS)rIN)r$)r@r(rrrrAIsz-Container.__subclasshook__.<locals>.<genexpr>T)r
rBr#r%)r&r'rrrr)FszContainer.__subclasshook__N)r*r+r,r-rrIr.r)rrrrr
>sc@s:eZdZfZedd��Zedd��ZdS)rcOsdS)NFr)r!�args�kwdsrrr�__call__RszCallable.__call__cCs0|tkr,tdd�|jD��r,dStS)Ncss|]}d|jkVqdS)rLN)r$)r@r(rrrrAYsz,Callable.__subclasshook__.<locals>.<genexpr>T)rrBr#r%)r&r'rrrr)VszCallable.__subclasshook__N)r*r+r,r-rrLr.r)rrrrrNsc@s�eZdZdZfZdd�Zdd�Zdd�Zdd	�Zd
d�Z	e
dd
��Zdd�ZeZ
dd�Zdd�ZeZdd�Zdd�Zdd�ZeZdd�ZdS)raZA set is a finite, iterable container.

    This class provides concrete generic implementations of all
    methods except for __contains__, __iter__ and __len__.

    To override the comparisons (presumably for speed, as the
    semantics are fixed), redefine __le__ and __ge__,
    then the other operations will automatically follow suit.
    cCsTt|t�stSt|�t|�kr/dSx|D]}||kr6dSq6WdS)NFT)�
isinstancerr%�len)r!�other�elemrrr�__le__os
z
Set.__le__cCs8t|t�stSt|�t|�ko7|j|�S)N)rMrr%rNrQ)r!rOrrr�__lt__ysz
Set.__lt__cCs8t|t�stSt|�t|�ko7|j|�S)N)rMrr%rN�__ge__)r!rOrrr�__gt__~sz
Set.__gt__cCsTt|t�stSt|�t|�kr/dSx|D]}||kr6dSq6WdS)NFT)rMrr%rN)r!rOrPrrrrS�s
z
Set.__ge__cCs8t|t�stSt|�t|�ko7|j|�S)N)rMrr%rNrQ)r!rOrrr�__eq__�sz
Set.__eq__cCs
||�S)z�Construct an instance of the class from any iterable input.

        Must override this method if the class constructor signature
        does not accept an iterable for an input.
        r)r&�itrrr�_from_iterable�szSet._from_iterablecs3t|t�stS�j�fdd�|D��S)Nc3s!|]}|�kr|VqdS)Nr)r@r2)r!rrrA�szSet.__and__.<locals>.<genexpr>)rMr	r%rW)r!rOr)r!r�__and__�szSet.__and__cCs%x|D]}||krdSqWdS)z1Return True if two sets have a null intersection.FTr)r!rOr2rrr�
isdisjoint�s
zSet.isdisjointcCs9t|t�stSdd�||fD�}|j|�S)Ncss"|]}|D]}|Vq
qdS)Nr)r@�s�errrrA�szSet.__or__.<locals>.<genexpr>)rMr	r%rW)r!rO�chainrrr�__or__�sz
Set.__or__csQt�t�s1t�t�s"tS|j���|j�fdd�|D��S)Nc3s!|]}|�kr|VqdS)Nr)r@r2)rOrrrA�szSet.__sub__.<locals>.<genexpr>)rMrr	r%rW)r!rOr)rOr�__sub__�s
zSet.__sub__csQt|t�s1t|t�s"tS�j|�}�j�fdd�|D��S)Nc3s!|]}|�kr|VqdS)Nr)r@r2)r!rrrA�szSet.__rsub__.<locals>.<genexpr>)rMrr	r%rW)r!rOr)r!r�__rsub__�s
zSet.__rsub__cCsAt|t�s1t|t�s"tS|j|�}||||BS)N)rMrr	r%rW)r!rOrrr�__xor__�s
zSet.__xor__cCs�tj}d|d}t|�}d|d}||M}x>|D]6}t|�}|||d>AdAdN}||M}qBW|dd}||M}||kr�||d8}|d
kr�d	}|S)a+Compute the hash value of a set.

        Note that we don't define __hash__: not all sets are hashable.
        But if you define a hashable set type, its __hash__ should
        call this function.

        This must be compatible __eq__.

        All sets ought to compare equal if they contain the same
        elements, regardless of how they are implemented, and
        regardless of the order of the elements; so there's not much
        freedom for __eq__ or __hash__.  We match the algorithm used
        by the built-in frozenset type.
        �riM��r�i�M[l�4~2i�
i��6i��8#���)�sys�maxsizerN�hash)r!�MAX�MASK�n�hrH�hxrrr�_hash�s 	


z	Set._hashN)r*r+r,�__doc__r-rQrRrTrSrUr.rWrX�__rand__rYr]�__ror__r^r_r`�__rxor__rlrrrrras$


	c@s�eZdZdZfZedd��Zedd��Zdd�Zdd	�Z	d
d�Z
dd
�Zdd�Zdd�Z
dd�ZdS)ra�A mutable set is a finite, iterable container.

    This class provides concrete generic implementations of all
    methods except for __contains__, __iter__, __len__,
    add(), and discard().

    To override the comparisons (presumably for speed, as the
    semantics are fixed), all you have to do is redefine __le__ and
    then the other operations will automatically follow suit.
    cCs
t�dS)zAdd an element.N)�NotImplementedError)r!r2rrr�add�szMutableSet.addcCs
t�dS)z8Remove an element.  Do not raise an exception if absent.N)rq)r!r2rrr�discardszMutableSet.discardcCs)||krt|��|j|�dS)z5Remove an element. If not a member, raise a KeyError.N)�KeyErrorrs)r!r2rrr�removeszMutableSet.removecCsHt|�}yt|�}Wntk
r6t�YnX|j|�|S)z2Return the popped value.  Raise KeyError if empty.)�iter�nextr1rtrs)r!rVr2rrr�pops

zMutableSet.popcCs.yx|j�qWWntk
r)YnXdS)z6This is slow (creates N new iterators!) but effective.N)rxrt)r!rrr�clears

zMutableSet.clearcCs"x|D]}|j|�qW|S)N)rr)r!rVr2rrr�__ior__s
zMutableSet.__ior__cCs&x||D]}|j|�qW|S)N)rs)r!rVr2rrr�__iand__"szMutableSet.__iand__cCsu||kr|j�nXt|t�s7|j|�}x7|D]/}||kr`|j|�q>|j|�q>W|S)N)ryrMrrWrsrr)r!rVr2rrr�__ixor__'s

zMutableSet.__ixor__cCs;||kr|j�nx|D]}|j|�q W|S)N)ryrs)r!rVr2rrr�__isub__4s


zMutableSet.__isub__N)r*r+r,rmr-rrrrsrurxryrzr{r|r}rrrrr�s


c@sseZdZfZedd��Zddd�Zdd�Zdd	�Zd
d�Z	dd
�Z
dd�ZdS)rcCs
t�dS)N)rt)r!�keyrrr�__getitem__NszMapping.__getitem__NcCs)y||SWntk
r$|SYnXdS)z<D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None.N)rt)r!r~�defaultrrr�getRs
zMapping.getcCs-y||Wntk
r$dSYnXdSdS)NFT)rt)r!r~rrrrIYs

	zMapping.__contains__cCs
t|�S)z:D.keys() -> a set-like object providing a view on D's keys)r)r!rrr�keysaszMapping.keyscCs
t|�S)z<D.items() -> a set-like object providing a view on D's items)r)r!rrr�itemsesz
Mapping.itemscCs
t|�S)z6D.values() -> an object providing a view on D's values)r)r!rrr�valuesiszMapping.valuescCs5t|t�stSt|j��t|j��kS)N)rMrr%�dictr�)r!rOrrrrUmszMapping.__eq__)r*r+r,r-rrr�rIr�r�r�rUrrrrrBs
c@s:eZdZd	Zdd�Zdd�Zdd�ZdS)
r�_mappingcCs
||_dS)N)r�)r!�mappingrrr�__init__yszMappingView.__init__cCs
t|j�S)N)rNr�)r!rrrrG|szMappingView.__len__cCs
dj|�S)Nz&{0.__class__.__name__}({0._mapping!r}))�format)r!rrr�__repr__szMappingView.__repr__N)r�)r*r+r,r-r�rGr�rrrrrusc@s@eZdZfZedd��Zdd�Zdd�ZdS)rcCs
t|�S)N)�set)r!rVrrrrW�szKeysView._from_iterablecCs
||jkS)N)r�)r!r~rrrrI�szKeysView.__contains__ccs|jEdHdS)N)r�)r!rrrrE�szKeysView.__iter__N)r*r+r,r-r.rWrIrErrrrr�sc@s@eZdZfZedd��Zdd�Zdd�ZdS)rcCs
t|�S)N)r�)r!rVrrrrW�szItemsView._from_iterablecCsD|\}}y|j|}Wntk
r5dSYnX||kSdS)NF)r�rt)r!�itemr~r2�vrrrrI�s
	zItemsView.__contains__ccs*x#|jD]}||j|fVq
WdS)N)r�)r!r~rrrrE�szItemsView.__iter__N)r*r+r,r-r.rWrIrErrrrr�s	c@s.eZdZfZdd�Zdd�ZdS)rcCs/x(|jD]}||j|kr
dSq
WdS)NTF)r�)r!r2r~rrrrI�szValuesView.__contains__ccs$x|jD]}|j|Vq
WdS)N)r�)r!r~rrrrE�szValuesView.__iter__N)r*r+r,r-rIrErrrrr�sc@s�eZdZfZedd��Zedd��Ze�Zedd�Z	dd�Z
d	d
�Zdd�Zd
dd�Z
d
S)rcCs
t�dS)N)rt)r!r~r2rrr�__setitem__�szMutableMapping.__setitem__cCs
t�dS)N)rt)r!r~rrr�__delitem__�szMutableMapping.__delitem__cCsHy||}Wn(tk
r8||jkr0�|SYnX||=|SdS)z�D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
          If key is not found, d is returned if given, otherwise KeyError is raised.
        N)rt�_MutableMapping__marker)r!r~r�r2rrrrx�s
	zMutableMapping.popcCsLytt|��}Wntk
r0t�YnX||}||=||fS)z�D.popitem() -> (k, v), remove and return some (key, value) pair
           as a 2-tuple; but raise KeyError if D is empty.
        )rwrvr1rt)r!r~r2rrr�popitem�s

zMutableMapping.popitemcCs.yx|j�qWWntk
r)YnXdS)z,D.clear() -> None.  Remove all items from D.N)r�rt)r!rrrry�s

zMutableMapping.clearcOs
|std��|^}}t|�dkrFtdt|���|r�|d}t|t�r�xw|D]}||||<qlWnXt|d�r�xF|j�D]}||||<q�Wn!x|D]\}}|||<q�Wx$|j�D]\}}|||<q�WdS)aK D.update([E, ]**F) -> None.  Update D from mapping/iterable E and F.
            If E present and has a .keys() method, does:     for k in E: D[k] = E[k]
            If E present and lacks .keys() method, does:     for (k, v) in E: D[k] = v
            In either case, this is followed by: for k, v in F.items(): D[k] = v
        z@descriptor 'update' of 'MutableMapping' object needs an argumentrz+update expected at most 1 arguments, got %drr�N)�	TypeErrorrNrMr�hasattrr�r�)rJrKr!rOr~r2rrr�update�s$

zMutableMapping.updateNcCs/y||SWntk
r*|||<YnX|S)z@D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D)rt)r!r~r�rrr�
setdefaults

zMutableMapping.setdefault)r*r+r,r-rr�r��objectr�rxr�ryr�r�rrrrr�s	c@speZdZdZfZedd��Zdd�Zdd�Zdd	�Z	d
ddd
�Z
dd�ZdS)rz�All the operations on a read-only sequence.

    Concrete subclasses must override __new__ or __init__,
    __getitem__, and __len__.
    cCs
t�dS)N)�
IndexError)r!�indexrrrr)szSequence.__getitem__ccsGd}y$x||}|V|d7}qWWntk
rBdSYnXdS)Nrr)r�)r!�ir�rrrrE-s

zSequence.__iter__cCs%x|D]}||krdSqWdS)NTFr)r!r2r�rrrrI7s
zSequence.__contains__ccs0x)ttt|���D]}||VqWdS)N)�reversed�rangerN)r!r�rrr�__reversed__=szSequence.__reversed__rNcCs�|dk	r1|dkr1tt|�|d�}|dk	rY|dkrY|t|�7}|}xT|dksz||kr�y|||kr�|SWntk
r�PYnX|d7}qbWt�dS)z�S.index(value, [start, [stop]]) -> integer -- return first index of value.
           Raises ValueError if the value is not present.
        Nrr)�maxrNr��
ValueError)r!r2�start�stopr�rrrr�As
zSequence.indexcst�fdd�|D��S)zBS.count(value) -> integer -- return number of occurrences of valuec3s!|]}|�krdVqdS)rNr)r@r�)r2rrrAVsz!Sequence.count.<locals>.<genexpr>)�sum)r!r2r)r2r�countTszSequence.count)r*r+r,rmr-rrrErIr�r�r�rrrrrs
c@seZdZdZfZdS)rzMThis unifies bytes and bytearray.

    XXX Should add all their methods.
    N)r*r+r,rmr-rrrrr^sc@s�eZdZfZedd��Zedd��Zedd��Zdd�Zd	d
�Z	dd�Z
d
d�Zddd�Zdd�Z
dd�ZdS)rcCs
t�dS)N)r�)r!r�r2rrrr�vszMutableSequence.__setitem__cCs
t�dS)N)r�)r!r�rrrr�zszMutableSequence.__delitem__cCs
t�dS)z3S.insert(index, value) -- insert value before indexN)r�)r!r�r2rrr�insert~szMutableSequence.insertcCs|jt|�|�dS)z:S.append(value) -- append value to the end of the sequenceN)r�rN)r!r2rrr�append�szMutableSequence.appendcCs.yx|j�qWWntk
r)YnXdS)z,S.clear() -> None -- remove all items from SN)rxr�)r!rrrry�s

zMutableSequence.clearcCsXt|�}xEt|d�D]3}|||d||||<|||d<qWdS)z!S.reverse() -- reverse *IN PLACE*rarN)rNr�)r!rir�rrr�reverse�szMutableSequence.reversecCs"x|D]}|j|�qWdS)zMS.extend(iterable) -- extend sequence by appending elements from the iterableN)r�)r!r�r�rrr�extend�s
zMutableSequence.extendrcCs||}||=|S)z�S.pop([index]) -> item -- remove and return item at index (default last).
           Raise IndexError if list is empty or index is out of range.
        r)r!r�r�rrrrx�s
zMutableSequence.popcCs||j|�=dS)zvS.remove(value) -- remove first occurrence of value.
           Raise ValueError if the value is not present.
        N)r�)r!r2rrrru�szMutableSequence.removecCs|j|�|S)N)r�)r!r�rrr�__iadd__�s
zMutableSequence.__iadd__Nrc)r*r+r,r-rr�r�r�r�ryr�r�rxrur�rrrrrks	lC)Erm�abcrrrd�__all__r*�typerv�bytes_iterator�	bytearray�bytearray_iteratorr��dict_keyiteratorr��dict_valueiteratorr��dict_itemiterator�
list_iteratorr��list_reverseiteratorr��range_iterator�longrange_iteratorr��set_iterator�str_iterator�tuple_iterator�zip�zip_iterator�	dict_keys�dict_values�
dict_itemsr$�mappingproxy�	generatorr �	coroutiner;rrr�registerrrr	r
rrr
rr�	frozensetrrrrrrrr�r�tuple�str�
memoryviewr�bytesr�listrrrr�<module>s�				
0













6
�
O
0



\
9



	

A