Hacked By AnonymousFox

Current Path : /lib64/python3.8/collections/__pycache__/
Upload File :
Current File : //lib64/python3.8/collections/__pycache__/__init__.cpython-38.pyc

U

e5dC��	@s&dZddddddddd	g	Zd
dlZd
dlmZmZd
d
lm	Z
d
dlZd
dl
Zd
dlmZd
dlmZmZmZd
dlmZzd
dlmZWnek
r�YnXej� e�zd
dlm!Z!Wnek
r�YnXdd�Z"Gdd�dej#�Z$Gdd�dej%�Z&Gdd�dej'�Z(Gdd�de)�Z*Gdd�de+�Z,zd
dlm,Z,Wnek
�rVYnXzd
dlm-Z-Wnek
�r�d d!�Z-YnXd"ddd#�d$d�Z.d%d&�Z/zd
d'lm/Z/Wnek
�r�YnXGd(d�de+�Z0Gd)d	�d	ej1�Z2Gd*d�dej1�Z3Gd+d�dej�Z4Gd,d�dej5�Z6dS)-a?This module implements specialized container datatypes providing
alternatives to Python's general purpose built-in containers, dict,
list, set, and tuple.

* namedtuple   factory function for creating tuple subclasses with named fields
* deque        list-like container with fast appends and pops on either end
* ChainMap     dict-like class for creating a single view of multiple mappings
* Counter      dict subclass for counting hashable objects
* OrderedDict  dict subclass that remembers the order entries were added
* defaultdict  dict subclass that calls a factory function to supply missing values
* UserDict     wrapper around dictionary objects for easier dict subclassing
* UserList     wrapper around list objects for easier list subclassing
* UserString   wrapper around string objects for easier string subclassing

�deque�defaultdict�
namedtuple�UserDict�UserList�
UserString�Counter�OrderedDict�ChainMap�N)�
itemgetter�eq)�	iskeyword)�proxy)�repeat�chain�starmap)�recursive_repr)r)rcCsR|tjkr:tt|�}ddl}|jdtdd�|t�|<|Stdt�d|����dS)Nr
z�Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working���
stacklevelzmodule z has no attribute )	�_collections_abc�__all__�getattr�warnings�warn�DeprecationWarning�globals�AttributeError�__name__)�name�objr�r!�,/usr/lib64/python3.8/collections/__init__.py�__getattr__*s

�
r#c@seZdZdd�ZdS)�_OrderedDictKeysViewccst|j�EdHdS�N��reversed�_mapping��selfr!r!r"�__reversed__?sz!_OrderedDictKeysView.__reversed__N�r�
__module__�__qualname__r+r!r!r!r"r$=sr$c@seZdZdd�ZdS)�_OrderedDictItemsViewccs$t|j�D]}||j|fVq
dSr%r&�r*�keyr!r!r"r+Dsz"_OrderedDictItemsView.__reversed__Nr,r!r!r!r"r/Bsr/c@seZdZdd�ZdS)�_OrderedDictValuesViewccs t|j�D]}|j|Vq
dSr%r&r0r!r!r"r+Jsz#_OrderedDictValuesView.__reversed__Nr,r!r!r!r"r2Hsr2c@seZdZdZdS)�_Link)�prev�nextr1�__weakref__N)rr-r.�	__slots__r!r!r!r"r3Nsr3c@s�eZdZdZd+dd�Zejeefdd�Zej	fdd�Z	d	d
�Z
dd�Zd
d�Zd,dd�Z
d-dd�Zdd�ZejjZZdd�Zdd�Zdd�ZejjZe�Zefdd�Zd.dd �Ze�d!d"��Zd#d$�Zd%d&�Ze d/d'd(��Z!d)d*�Z"dS)0rz)Dictionary that remembers insertion orderr!cKs\z
|jWn>tk
rHt�|_t|j�|_}||_|_i|_YnX|j|f|�dS)z�Initialize an ordered dictionary.  The signature is the same as
        regular dictionaries.  Keyword argument order is preserved.
        N)	�_OrderedDict__rootrr3�_OrderedDict__hardroot�_proxyr4r5�_OrderedDict__map�_OrderedDict__update)r*�other�kwds�rootr!r!r"�__init__`s
zOrderedDict.__init__c	CsZ||krJ|�|j|<}|j}|j}||||_|_|_||_||�|_||||�dS)z!od.__setitem__(i, y) <==> od[i]=yN)r;r8r4r5r1)	r*r1�valueZdict_setitemrZLink�linkr?�lastr!r!r"�__setitem__ms
zOrderedDict.__setitem__cCs>|||�|j�|�}|j}|j}||_||_d|_d|_dS)z od.__delitem__(y) <==> del od[y]N)r;�popr4r5)r*r1Zdict_delitemrB�	link_prev�	link_nextr!r!r"�__delitem__{s
zOrderedDict.__delitem__ccs(|j}|j}||k	r$|jV|j}qdS)zod.__iter__() <==> iter(od)N)r8r5r1�r*r?Zcurrr!r!r"�__iter__�s
zOrderedDict.__iter__ccs(|j}|j}||k	r$|jV|j}qdS)z#od.__reversed__() <==> reversed(od)N)r8r4r1rIr!r!r"r+�s
zOrderedDict.__reversed__cCs*|j}||_|_|j��t�|�dS)z.od.clear() -> None.  Remove all items from od.N)r8r4r5r;�clear�dict)r*r?r!r!r"rK�s
zOrderedDict.clearTcCsj|std��|j}|r0|j}|j}||_||_n|j}|j}||_||_|j}|j|=t�||�}||fS)z�Remove and return a (key, value) pair from the dictionary.

        Pairs are returned in LIFO order if last is true or FIFO order if false.
        zdictionary is empty)�KeyErrorr8r4r5r1r;rLrE)r*rCr?rBrFrGr1rAr!r!r"�popitem�s zOrderedDict.popitemc	Cst|j|}|j}|j}|j}||_||_|j}|rR|j}||_||_||_||_n|j}||_||_||_||_dS)z�Move an existing element to the end (or beginning if last is false).

        Raise KeyError if the element does not exist.
        N)r;r4r5r8)	r*r1rCrBrFrGZ	soft_linkr?�firstr!r!r"�move_to_end�s$
zOrderedDict.move_to_endcCsVtj}t|�d}||j�}|||j�d7}|||j�|7}|||j�|7}|S)N�r)�_sys�	getsizeof�len�__dict__r;r9r8)r*Zsizeof�n�sizer!r!r"�
__sizeof__�s
zOrderedDict.__sizeof__cCst|�S)z:D.keys() -> a set-like object providing a view on D's keys)r$r)r!r!r"�keys�szOrderedDict.keyscCst|�S)z<D.items() -> a set-like object providing a view on D's items)r/r)r!r!r"�items�szOrderedDict.itemscCst|�S)z6D.values() -> an object providing a view on D's values)r2r)r!r!r"�values�szOrderedDict.valuescCs0||kr||}||=|S||jkr,t|��|S)z�od.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.

        )�_OrderedDict__markerrM)r*r1�default�resultr!r!r"rE�s
zOrderedDict.popNcCs||kr||S|||<|S)z�Insert key with a value of default if key is not in the dictionary.

        Return the value for key if key is in the dictionary, else default.
        r!�r*r1r]r!r!r"�
setdefault�szOrderedDict.setdefaultcCs*|sd|jjfSd|jjt|���fS)zod.__repr__() <==> repr(od)�%s()z%s(%r))�	__class__r�listrZr)r!r!r"�__repr__szOrderedDict.__repr__cCsDt|���}tt��D]}|�|d�q|jd|p4ddt|���fS)z%Return state information for picklingNr!)�vars�copyrrErb�iterrZ)r*Z	inst_dict�kr!r!r"�
__reduce__szOrderedDict.__reduce__cCs
|�|�S)z!od.copy() -> a shallow copy of od�rbr)r!r!r"rfszOrderedDict.copycCs|�}|D]}|||<q
|S)zYCreate a new ordered dictionary with keys from iterable and values set to value.
        r!)�cls�iterablerAr*r1r!r!r"�fromkeyss
zOrderedDict.fromkeyscCs2t|t�r&t�||�o$ttt||��St�||�S)z�od.__eq__(y) <==> od==y.  Comparison to another OD is order-sensitive
        while comparison to a regular mapping is order-insensitive.

        )�
isinstancerrL�__eq__�all�map�_eq�r*r=r!r!r"ros
zOrderedDict.__eq__)r!)T)T)N)N)#rr-r.�__doc__r@rLrDr:r3rHrJr+rKrNrPrXr�MutableMapping�updater<rYrZr[�__ne__�objectr\rEr`�_recursive_reprrdrirf�classmethodrmror!r!r!r"rQs8
�

		

	


)r)�_tuplegettercCstt|�|d�S)N)�doc)�property�_itemgetter)�indexr|r!r!r"�<lambda>7�r�F)�rename�defaults�modulecs�t�t�r��dd����ttt����t�t|��}|r�t�}t	��D]B\}}|�
�rrt|�sr|�d�sr||kr�d|���|<|�
|�qH|g�D]D}t|�tk	r�td��|�
�s�td|����t|�r�td|����q�t�}�D]F}|�d��r
|�s
td|����||k�r"td|����|�
|�q�i}|d	k	�r|t|�}t|�t��k�r^td
��ttttt��t|�����}tttj����t���t���dd�d
d�}	dd�dd��D��d�tj�tttttf\�����d|	�d|	�d�}
�d|��d�}t|
|�|d}d|�d|	�d�|_|d	k	�r>||_t���fdd��}
d|�d�|
j_��fdd �}d!|�d"�|_�fd#d$�}��fd%d&�}�fd'd(�}||
j||||fD]}|�d)|j��|_�q�|�d|	�d�d*�||||
||||d+�}t	��D](\}}t�d,|���}t ||�||<�qt|tf|�}|d	k�rvzt�!d
�j"�#d-d.�}Wnt$tfk
�rtYnX|d	k	�r�||_%|S)/aCReturns a new subclass of tuple with named fields.

    >>> Point = namedtuple('Point', ['x', 'y'])
    >>> Point.__doc__                   # docstring for the new class
    'Point(x, y)'
    >>> p = Point(11, y=22)             # instantiate with positional args or keywords
    >>> p[0] + p[1]                     # indexable like a plain tuple
    33
    >>> x, y = p                        # unpack like a regular tuple
    >>> x, y
    (11, 22)
    >>> p.x + p.y                       # fields also accessible by name
    33
    >>> d = p._asdict()                 # convert to a dictionary
    >>> d['x']
    11
    >>> Point(**d)                      # convert from a dictionary
    Point(x=11, y=22)
    >>> p._replace(x=100)               # _replace() is like str.replace() but targets named fields
    Point(x=100, y=22)

    �,� �_z*Type names and field names must be stringsz6Type names and field names must be valid identifiers: z0Type names and field names cannot be a keyword: z-Field names cannot start with an underscore: z"Encountered duplicate field name: Nz(Got more default values than field names�'�rQ����(�, css|]}|�d�VqdS)z=%rNr!)�.0rr!r!r"�	<genexpr>�sznamedtuple.<locals>.<genexpr>�)zdef __new__(_cls, z): return _tuple_new(_cls, (z))�namedtuple_)�
_tuple_newr�__new__zCreate new instance of cs2�||�}�|��kr.td��dt|�����|S)Nz	Expected z arguments, got )�	TypeErrorrT)rkrlr^)�_len�
num_fields�	tuple_newr!r"�_make�s
znamedtuple.<locals>._makezMake a new z# object from a sequence or iterablecs.|��|j�|��}|r*tdt|�����|S)NzGot unexpected field names: )r�rE�
ValueErrorrc)r*r>r^)�_map�field_namesr!r"�_replace�sznamedtuple.<locals>._replacez
Return a new z2 object replacing specified fields with new valuescs|jj�|S)z/Return a nicely formatted representation string)rbrr))�repr_fmtr!r"rd�sznamedtuple.<locals>.__repr__cs��|j|��S)z9Return a new dict which maps field names to their values.)�_fieldsr))�_dict�_zipr!r"�_asdict�sznamedtuple.<locals>._asdictcs�|�S)z7Return self as a plain tuple.  Used by copy and pickle.r!r))�_tupler!r"�__getnewargs__�sz"namedtuple.<locals>.__getnewargs__�.r!)rtr7r��_field_defaults�_fields_defaultsr�r�r�rdr�r�zAlias for field number r�__main__)&rn�str�replace�splitrcrqrR�intern�set�	enumerate�isidentifier�
_iskeyword�
startswith�add�typer�r��tuplerTrLr'�zip�repr�joinr��execrt�__defaults__rz�__func__rr.r{�	_getframe�	f_globals�getrr-)�typenamer�r�r�r��seenrr�field_defaults�arg_list�s�	namespacer�r�r�rdr�r��method�class_namespacer|r^r!)	r�r�r�r�r�r�r�r�r�r"r9s�
���

�


��

cCs&|j}|D]}||d�d||<q
dS)z!Tally elements from the iterable.r
rQN)r�)�mappingrlZmapping_get�elemr!r!r"�_count_elements�sr�)r�cs�eZdZdZd/�fdd�	Zdd�Zd0dd�Zd	d
�Zed1dd��Z	d2�fd
d�	Z
d3dd�Zdd�Zdd�Z
�fdd�Zdd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Z�ZS)4ra�Dict subclass for counting hashable items.  Sometimes called a bag
    or multiset.  Elements are stored as dictionary keys and their counts
    are stored as dictionary values.

    >>> c = Counter('abcdeabcdabcaba')  # count elements from a string

    >>> c.most_common(3)                # three most common elements
    [('a', 5), ('b', 4), ('c', 3)]
    >>> sorted(c)                       # list all unique elements
    ['a', 'b', 'c', 'd', 'e']
    >>> ''.join(sorted(c.elements()))   # list elements with repetitions
    'aaaaabbbbcccdde'
    >>> sum(c.values())                 # total of all counts
    15

    >>> c['a']                          # count of letter 'a'
    5
    >>> for elem in 'shazam':           # update counts from an iterable
    ...     c[elem] += 1                # by adding 1 to each element's count
    >>> c['a']                          # now there are seven 'a'
    7
    >>> del c['b']                      # remove all 'b'
    >>> c['b']                          # now there are zero 'b'
    0

    >>> d = Counter('simsalabim')       # make another counter
    >>> c.update(d)                     # add in the second counter
    >>> c['a']                          # now there are nine 'a'
    9

    >>> c.clear()                       # empty the counter
    >>> c
    Counter()

    Note:  If a count is set to zero or reduced to zero, it will remain
    in the counter until the entry is deleted or the counter is cleared:

    >>> c = Counter('aaabbc')
    >>> c['b'] -= 2                     # reduce the count of 'b' by two
    >>> c.most_common()                 # 'b' is still in, but its count is zero
    [('a', 3), ('c', 1), ('b', 0)]

    Ncs tt|���|j|f|�dS)a	Create a new, empty Counter object.  And if given, count elements
        from an input iterable.  Or, initialize the count from another mapping
        of elements to their counts.

        >>> c = Counter()                           # a new, empty counter
        >>> c = Counter('gallahad')                 # a new counter from an iterable
        >>> c = Counter({'a': 4, 'b': 2})           # a new counter from a mapping
        >>> c = Counter(a=4, b=2)                   # a new counter from keyword args

        N)�superrr@rv)r*rlr>rjr!r"r@szCounter.__init__cCsdS)z1The count of elements not in the Counter is zero.r
r!r0r!r!r"�__missing__*szCounter.__missing__cCs6|dkrt|��td�dd�Stj||��td�d�S)z�List the n most common elements and their counts from the most
        common to the least.  If n is None, then list all element counts.

        >>> Counter('abracadabra').most_common(3)
        [('a', 5), ('b', 2), ('r', 2)]

        NrQT)r1�reverse�r1)�sortedrZr~�_heapq�nlargest�r*rVr!r!r"�most_common/s	zCounter.most_commoncCst�tt|����S)a�Iterator over elements repeating each as many times as its count.

        >>> c = Counter('ABCABC')
        >>> sorted(c.elements())
        ['A', 'A', 'B', 'B', 'C', 'C']

        # Knuth's example for prime factors of 1836:  2**2 * 3**3 * 17**1
        >>> prime_factors = Counter({2: 2, 3: 3, 17: 1})
        >>> product = 1
        >>> for factor in prime_factors.elements():     # loop over factors
        ...     product *= factor                       # and multiply them
        >>> product
        1836

        Note, if an element's count has been set to zero or is a negative
        number, elements() will ignore it.

        )�_chain�
from_iterable�_starmap�_repeatrZr)r!r!r"�elements<szCounter.elementscCstd��dS)Nz@Counter.fromkeys() is undefined.  Use Counter(iterable) instead.)�NotImplementedError)rkrl�vr!r!r"rmTs	�zCounter.fromkeyscsr|dk	r`t|tj�rV|rD|j}|��D]\}}|||d�||<q&q`tt|��|�n
t||�|rn|�|�dS)a�Like dict.update() but add counts instead of replacing them.

        Source can be an iterable, a dictionary, or another Counter instance.

        >>> c = Counter('which')
        >>> c.update('witch')           # add elements from another iterable
        >>> d = Counter('watch')
        >>> c.update(d)                 # add elements from another counter
        >>> c['h']                      # four 'h' in which, witch, and watch
        4

        Nr
)	rnr�Mappingr�rZr�rrvr��r*rlr>�self_getr��countrjr!r"rv`s
zCounter.updatecKsn|dk	r\|j}t|tj�r@|��D]\}}||d�|||<q"n|D]}||d�d||<qD|rj|�|�dS)a�Like dict.update() but subtracts counts instead of replacing them.
        Counts can be reduced below zero.  Both the inputs and outputs are
        allowed to contain zero and negative counts.

        Source can be an iterable, a dictionary, or another Counter instance.

        >>> c = Counter('which')
        >>> c.subtract('witch')             # subtract elements from another iterable
        >>> c.subtract(Counter('watch'))    # subtract elements from another counter
        >>> c['h']                          # 2 in which, minus 1 in witch, minus 1 in watch
        0
        >>> c['w']                          # 1 in which, minus 1 in witch, minus 1 in watch
        -1

        Nr
rQ)r�rnrr�rZ�subtractr�r!r!r"r��szCounter.subtractcCs
|�|�S)zReturn a shallow copy.rjr)r!r!r"rf�szCounter.copycCs|jt|�ffSr%)rbrLr)r!r!r"ri�szCounter.__reduce__cs||krt��|�dS)zGLike dict.__delitem__() but does not raise KeyError for missing values.N)r�rH)r*r�rjr!r"rH�szCounter.__delitem__cCsf|sd|jjSz(d�tdj|����}d|jj|fWStk
r`d�|jjt|��YSXdS)Nrar�z%r: %rz%s({%s})z
{0}({1!r}))	rbrr�rq�__mod__r�r��formatrL)r*rZr!r!r"rd�szCounter.__repr__cCspt|t�stSt�}|��D]$\}}|||}|dkr|||<q|��D] \}}||krJ|dkrJ|||<qJ|S)zAdd counts from two counters.

        >>> Counter('abbb') + Counter('bcc')
        Counter({'b': 4, 'c': 2, 'a': 1})

        r
�rnr�NotImplementedrZ�r*r=r^r�r��newcountr!r!r"�__add__�s


zCounter.__add__cCstt|t�stSt�}|��D]$\}}|||}|dkr|||<q|��D]$\}}||krJ|dkrJd|||<qJ|S)z� Subtract count, but keep only results with positive counts.

        >>> Counter('abbbc') - Counter('bccd')
        Counter({'b': 2, 'a': 1})

        r
r�r�r!r!r"�__sub__�s

zCounter.__sub__cCs|t|t�stSt�}|��D]0\}}||}||kr8|n|}|dkr|||<q|��D] \}}||krV|dkrV|||<qV|S)z�Union is the maximum of value in either of the input counters.

        >>> Counter('abbb') | Counter('bcc')
        Counter({'b': 3, 'c': 2, 'a': 1})

        r
r��r*r=r^r�r��other_countr�r!r!r"�__or__�s


zCounter.__or__cCsRt|t�stSt�}|��D]0\}}||}||kr8|n|}|dkr|||<q|S)z� Intersection is the minimum of corresponding counts.

        >>> Counter('abbb') & Counter('bcc')
        Counter({'b': 1})

        r
r�r�r!r!r"�__and__�s

zCounter.__and__cCs,t�}|��D]\}}|dkr|||<q|S)zEAdds an empty counter, effectively stripping negative and zero countsr
�rrZ�r*r^r�r�r!r!r"�__pos__
s

zCounter.__pos__cCs0t�}|��D]\}}|dkrd|||<q|S)z{Subtracts from an empty counter.  Strips positive and zero counts,
        and flips the sign on negative counts.

        r
r�r�r!r!r"�__neg__s
zCounter.__neg__cCs&dd�|��D�}|D]
}||=q|S)z?Internal method to strip elements with a negative or zero countcSsg|]\}}|dks|�qS)r
r!)r�r�r�r!r!r"�
<listcomp>"sz*Counter._keep_positive.<locals>.<listcomp>)rZ)r*�nonpositiver�r!r!r"�_keep_positive szCounter._keep_positivecCs*|��D]\}}|||7<q|��S)z�Inplace add from another counter, keeping only positive counts.

        >>> c = Counter('abbb')
        >>> c += Counter('bcc')
        >>> c
        Counter({'b': 4, 'c': 2, 'a': 1})

        �rZr��r*r=r�r�r!r!r"�__iadd__'s	zCounter.__iadd__cCs*|��D]\}}|||8<q|��S)z�Inplace subtract counter, but keep only results with positive counts.

        >>> c = Counter('abbbc')
        >>> c -= Counter('bccd')
        >>> c
        Counter({'b': 2, 'a': 1})

        r�r�r!r!r"�__isub__4s	zCounter.__isub__cCs2|��D] \}}||}||kr|||<q|��S)z�Inplace union is the maximum of value from either counter.

        >>> c = Counter('abbb')
        >>> c |= Counter('bcc')
        >>> c
        Counter({'b': 3, 'c': 2, 'a': 1})

        r�)r*r=r�r�r�r!r!r"�__ior__As
	
zCounter.__ior__cCs2|��D] \}}||}||kr|||<q|��S)z�Inplace intersection is the minimum of corresponding counts.

        >>> c = Counter('abbb')
        >>> c &= Counter('bcc')
        >>> c
        Counter({'b': 1})

        r�)r*r=r�r�r�r!r!r"�__iand__Ps
	
zCounter.__iand__)N)N)N)N)N)rr-r.rtr@r�r�r�rzrmrvr�rfrirHrdr�r�r�r�r�r�r�r�r�r�r��
__classcell__r!r!rjr"r�s02

!


c@s�eZdZdZdd�Zdd�Zdd�Zd'd	d
�Zdd�Zd
d�Z	dd�Z
dd�Ze�dd��Z
edd��Zdd�ZeZd(dd�Zedd��Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�ZdS))r	a� A ChainMap groups multiple dicts (or other mappings) together
    to create a single, updateable view.

    The underlying mappings are stored in a list.  That list is public and can
    be accessed or updated using the *maps* attribute.  There is no other
    state.

    Lookups search the underlying mappings successively until a key is found.
    In contrast, writes, updates, and deletions only operate on the first
    mapping.

    cGst|�pig|_dS)z�Initialize a ChainMap by setting *maps* to the given mappings.
        If no mappings are provided, a single empty dictionary is used.

        N)rc�maps)r*r�r!r!r"r@rszChainMap.__init__cCst|��dSr%)rMr0r!r!r"r�yszChainMap.__missing__c	Cs:|jD](}z||WStk
r,YqXq|�|�Sr%)r�rMr�)r*r1r�r!r!r"�__getitem__|s
zChainMap.__getitem__NcCs||kr||S|Sr%r!r_r!r!r"r��szChainMap.getcCstt�j|j��Sr%)rTr��unionr�r)r!r!r"�__len__�szChainMap.__len__cCs&i}t|j�D]}|�|�qt|�Sr%)r'r�rvrg)r*�dr�r!r!r"rJ�szChainMap.__iter__cst�fdd�|jD��S)Nc3s|]}�|kVqdSr%r!)r��mr�r!r"r��sz(ChainMap.__contains__.<locals>.<genexpr>��anyr�r0r!r�r"�__contains__�szChainMap.__contains__cCs
t|j�Sr%r�r)r!r!r"�__bool__�szChainMap.__bool__cCs"|jj�dd�tt|j���d�S)Nr�r�r�)rbrr�rqr�r�r)r!r!r"rd�szChainMap.__repr__cGs|tj|f|���S)z?Create a ChainMap with a single dict created from the iterable.)rLrm)rkrl�argsr!r!r"rm�szChainMap.fromkeyscCs$|j|jd��f|jdd���S)zHNew ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]r
rQN)rbr�rfr)r!r!r"rf�sz
ChainMap.copycCs|dkri}|j|f|j��S)zyNew ChainMap with a new map followed by all previous maps.
        If no map is provided, an empty dict is used.
        N�rbr�)r*r�r!r!r"�	new_child�szChainMap.new_childcCs|j|jdd��S)zNew ChainMap from maps[1:].rQNrr)r!r!r"�parents�szChainMap.parentscCs||jd|<dS�Nr
)r�)r*r1rAr!r!r"rD�szChainMap.__setitem__cCs8z|jd|=Wn"tk
r2td�|���YnXdS)Nr
�(Key not found in the first mapping: {!r})r�rMr�r0r!r!r"rH�szChainMap.__delitem__cCs2z|jd��WStk
r,td��YnXdS)zPRemove and return an item pair from maps[0]. Raise KeyError is maps[0] is empty.r
z#No keys found in the first mapping.N)r�rNrMr)r!r!r"rN�szChainMap.popitemcGs@z|jdj|f|��WStk
r:td�|���YnXdS)zWRemove *key* from maps[0] and return its value. Raise KeyError if *key* not in maps[0].r
rN)r�rErMr�)r*r1rr!r!r"rE�szChainMap.popcCs|jd��dS)z'Clear maps[0], leaving maps[1:] intact.r
N)r�rKr)r!r!r"rK�szChainMap.clear)N)N)rr-r.rtr@r�r�r�r�rJr�r�ryrdrzrmrf�__copy__rr}rrDrHrNrErKr!r!r!r"r	ds.





c@speZdZdd�Zde_dd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
eddd��ZdS)rcOs�|std��|^}}t|�dkr0tdt|���|r>|d}n0d|krj|�d�}ddl}|jdtdd�nd}i|_|dk	r�|�|�|r�|�|�dS)	Nz<descriptor '__init__' of 'UserDict' object needs an argumentrQz$expected at most 1 arguments, got %dr
rLz0Passing 'dict' as keyword argument is deprecatedrr)r�rTrErrr�datarv)r�kwargsr*rLrr!r!r"r@�s(

�
zUserDict.__init__z($self, dict=None, /, **kwargs)cCs
t|j�Sr%�rTrr)r!r!r"r��r�zUserDict.__len__cCs:||jkr|j|St|jd�r.|j�||�St|��dS)Nr�)r�hasattrrbr�rMr0r!r!r"r��s


zUserDict.__getitem__cCs||j|<dSr%�r)r*r1�itemr!r!r"rD�r�zUserDict.__setitem__cCs|j|=dSr%rr0r!r!r"rH�r�zUserDict.__delitem__cCs
t|j�Sr%)rgrr)r!r!r"rJ�szUserDict.__iter__cCs
||jkSr%rr0r!r!r"r��szUserDict.__contains__cCs
t|j�Sr%�r�rr)r!r!r"rd�r�zUserDict.__repr__cCs4|j�|j�}|j�|j�|jd��|jd<|S�Nr)rbr�rUrvrf�r*�instr!r!r"r�szUserDict.__copy__cCsR|jtkrt|j���Sddl}|j}zi|_|�|�}W5||_X|�|�|Sr)rbrrrfrv)r*rfr�cr!r!r"rfs

z
UserDict.copyNcCs|�}|D]}|||<q
|Sr%r!)rkrlrAr�r1r!r!r"rms
zUserDict.fromkeys)N)rr-r.r@�__text_signature__r�r�rDrHrJr�rdrrfrzrmr!r!r!r"r�s
c@seZdZdZd@dd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�ZeZd%d&�Zd'd(�Zd)d*�Zd+d,�ZdAd.d/�Zd0d1�Zd2d3�Zd4d5�Zd6d7�Zd8d9�Zd:d;�Z d<d=�Z!d>d?�Z"dS)BrzAA more or less complete user-defined wrapper around list objects.NcCsbg|_|dk	r^t|�t|j�kr0||jdd�<n.t|t�rT|jdd�|jdd�<n
t|�|_dSr%)rr�rnrrc)r*�initlistr!r!r"r@!s
zUserList.__init__cCs
t|j�Sr%r
r)r!r!r"rd+r�zUserList.__repr__cCs|j|�|�kSr%�r�_UserList__castrsr!r!r"�__lt__,r�zUserList.__lt__cCs|j|�|�kSr%rrsr!r!r"�__le__-r�zUserList.__le__cCs|j|�|�kSr%rrsr!r!r"ro.r�zUserList.__eq__cCs|j|�|�kSr%rrsr!r!r"�__gt__/r�zUserList.__gt__cCs|j|�|�kSr%rrsr!r!r"�__ge__0r�zUserList.__ge__cCst|t�r|jS|Sr%)rnrrrsr!r!r"�__cast1szUserList.__castcCs
||jkSr%r�r*rr!r!r"r�3r�zUserList.__contains__cCs
t|j�Sr%r	r)r!r!r"r�4r�zUserList.__len__cCs(t|t�r|�|j|�S|j|SdSr%)rn�slicerbr�r*�ir!r!r"r�5s
zUserList.__getitem__cCs||j|<dSr%r�r*rrr!r!r"rD:r�zUserList.__setitem__cCs|j|=dSr%rrr!r!r"rH;r�zUserList.__delitem__cCsPt|t�r|�|j|j�St|t|j��r<|�|j|�S|�|jt|��Sr%�rnrrbrr�rcrsr!r!r"r�<s

zUserList.__add__cCsPt|t�r|�|j|j�St|t|j��r<|�||j�S|�t|�|j�Sr%r rsr!r!r"�__radd__Bs

zUserList.__radd__cCsRt|t�r|j|j7_n2t|t|j��r<|j|7_n|jt|�7_|Sr%)rnrrr�rcrsr!r!r"r�Hs
zUserList.__iadd__cCs|�|j|�Sr%�rbrr�r!r!r"�__mul__PszUserList.__mul__cCs|j|9_|Sr%rr�r!r!r"�__imul__SszUserList.__imul__cCs8|j�|j�}|j�|j�|jddd�|jd<|Sr)rbr�rUrvrr!r!r"rVszUserList.__copy__cCs|j�|�dSr%)r�appendrr!r!r"r%\r�zUserList.appendcCs|j�||�dSr%)r�insertrr!r!r"r&]r�zUserList.insertr�cCs|j�|�Sr%)rrErr!r!r"rE^r�zUserList.popcCs|j�|�dSr%)r�removerr!r!r"r'_r�zUserList.removecCs|j��dSr%)rrKr)r!r!r"rK`r�zUserList.clearcCs
|�|�Sr%rjr)r!r!r"rfar�z
UserList.copycCs|j�|�Sr%)rr�rr!r!r"r�br�zUserList.countcGs|jj|f|��Sr%�rr)r*rrr!r!r"rcr�zUserList.indexcCs|j��dSr%)rr�r)r!r!r"r�dr�zUserList.reversecOs|jj||�dSr%)r�sort�r*rr>r!r!r"r)er�z
UserList.sortcCs*t|t�r|j�|j�n|j�|�dSr%)rnrr�extendrsr!r!r"r+fs
zUserList.extend)N)r�)#rr-r.rtr@rdrrrorrrr�r�r�rDrHr�r!r�r#�__rmul__r$rr%r&rEr'rKrfr�rr�r)r+r!r!r!r"rs@


c@sheZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�ZeZd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1ejfd2d3�Zd�d6d7�Zd1ejfd8d9�Z d�d;d<�Z!d1ejfd=d>�Z"d?d@�Z#dAdB�Z$d1ejfdCdD�Z%dEdF�Z&dGdH�Z'dIdJ�Z(dKdL�Z)dMdN�Z*dOdP�Z+dQdR�Z,dSdT�Z-dUdV�Z.dWdX�Z/dYdZ�Z0d[d\�Z1d]d^�Z2d_d`�Z3dadb�Z4d�ddde�Z5e6j7Z7dfdg�Z8d�didj�Z9d1ejfdkdl�Z:d1ejfdmdn�Z;dodp�Z<dqdr�Z=d�dsdt�Z>d�dudv�Z?d�dwdx�Z@d�dzd{�ZAd1ejfd|d}�ZBd�d~d�ZCd�d��ZDd�d��ZEd�d��ZFd�d��ZGd�d��ZHdcS)�rcCs<t|t�r||_n&t|t�r.|jdd�|_n
t|�|_dSr%)rnr�rr�r*�seqr!r!r"r@ss


zUserString.__init__cCs
t|j�Sr%)r�rr)r!r!r"�__str__zr�zUserString.__str__cCs
t|j�Sr%r
r)r!r!r"rd{r�zUserString.__repr__cCs
t|j�Sr%)�intrr)r!r!r"�__int__|r�zUserString.__int__cCs
t|j�Sr%)�floatrr)r!r!r"�	__float__}r�zUserString.__float__cCs
t|j�Sr%)�complexrr)r!r!r"�__complex__~r�zUserString.__complex__cCs
t|j�Sr%)�hashrr)r!r!r"�__hash__r�zUserString.__hash__cCs|jdd�fSr%rr)r!r!r"r��szUserString.__getnewargs__cCs t|t�r|j|jkS|j|kSr%�rnrr�r*�stringr!r!r"ro�s
zUserString.__eq__cCs t|t�r|j|jkS|j|kSr%r8r9r!r!r"r�s
zUserString.__lt__cCs t|t�r|j|jkS|j|kSr%r8r9r!r!r"r�s
zUserString.__le__cCs t|t�r|j|jkS|j|kSr%r8r9r!r!r"r�s
zUserString.__gt__cCs t|t�r|j|jkS|j|kSr%r8r9r!r!r"r�s
zUserString.__ge__cCst|t�r|j}||jkSr%r8)r*�charr!r!r"r��s
zUserString.__contains__cCs
t|j�Sr%r	r)r!r!r"r��r�zUserString.__len__cCs|�|j|�Sr%r")r*rr!r!r"r��r�zUserString.__getitem__cCsJt|t�r|�|j|j�St|t�r6|�|j|�S|�|jt|��Sr%)rnrrbrr�rsr!r!r"r��s


zUserString.__add__cCs.t|t�r|�||j�S|�t|�|j�Sr%)rnr�rbrrsr!r!r"r!�s
zUserString.__radd__cCs|�|j|�Sr%r"r�r!r!r"r#�szUserString.__mul__cCs|�|j|�Sr%r"�r*rr!r!r"r��szUserString.__mod__cCs|�t|�|�Sr%)rbr�)r*�templater!r!r"�__rmod__�szUserString.__rmod__cCs|�|j���Sr%)rbr�
capitalizer)r!r!r"r?�r�zUserString.capitalizecCs|�|j���Sr%)rbr�casefoldr)r!r!r"r@�szUserString.casefoldcGs|�|jj|f|���Sr%)rbr�center�r*�widthrr!r!r"rA�szUserString.centerr
cCs t|t�r|j}|j�|||�Sr%)rnrrr��r*�sub�start�endr!r!r"r��s
zUserString.count�utf-8�strictcCs.|dkrdn|}|dkrdn|}|j�||�S)NrHrI)r�encode)r*�encoding�errorsr!r!r"rJ�szUserString.encodecCs|j�|||�Sr%)r�endswith)r*�suffixrFrGr!r!r"rM�szUserString.endswith�cCs|�|j�|��Sr%)rbr�
expandtabs)r*�tabsizer!r!r"rP�szUserString.expandtabscCs t|t�r|j}|j�|||�Sr%)rnrr�findrDr!r!r"rR�s
zUserString.findcOs|jj||�Sr%)rr�r*r!r!r"r��szUserString.formatcCs|j�|�Sr%)r�
format_map)r*r�r!r!r"rS�szUserString.format_mapcCs|j�|||�Sr%r(rDr!r!r"r�szUserString.indexcCs
|j��Sr%)r�isalphar)r!r!r"rT�r�zUserString.isalphacCs
|j��Sr%)r�isalnumr)r!r!r"rU�r�zUserString.isalnumcCs
|j��Sr%)r�isasciir)r!r!r"rV�r�zUserString.isasciicCs
|j��Sr%)r�	isdecimalr)r!r!r"rW�r�zUserString.isdecimalcCs
|j��Sr%)r�isdigitr)r!r!r"rX�r�zUserString.isdigitcCs
|j��Sr%)rr�r)r!r!r"r��r�zUserString.isidentifiercCs
|j��Sr%)r�islowerr)r!r!r"rY�r�zUserString.islowercCs
|j��Sr%)r�	isnumericr)r!r!r"rZ�r�zUserString.isnumericcCs
|j��Sr%)r�isprintabler)r!r!r"r[�r�zUserString.isprintablecCs
|j��Sr%)r�isspacer)r!r!r"r\�r�zUserString.isspacecCs
|j��Sr%)r�istitler)r!r!r"r]�r�zUserString.istitlecCs
|j��Sr%)r�isupperr)r!r!r"r^�r�zUserString.isuppercCs|j�|�Sr%)rr�r-r!r!r"r��r�zUserString.joincGs|�|jj|f|���Sr%)rbr�ljustrBr!r!r"r_�szUserString.ljustcCs|�|j���Sr%)rbr�lowerr)r!r!r"r`�r�zUserString.lowerNcCs|�|j�|��Sr%)rbr�lstrip�r*�charsr!r!r"ra�r�zUserString.lstripcCs|j�|�Sr%)r�	partition�r*�sepr!r!r"rd�szUserString.partitionr�cCs6t|t�r|j}t|t�r |j}|�|j�|||��Sr%)rnrrrbr�)r*�old�new�maxsplitr!r!r"r��s


zUserString.replacecCs t|t�r|j}|j�|||�Sr%)rnrr�rfindrDr!r!r"rj�s
zUserString.rfindcCs|j�|||�Sr%)r�rindexrDr!r!r"rk�szUserString.rindexcGs|�|jj|f|���Sr%)rbr�rjustrBr!r!r"rl�szUserString.rjustcCs|j�|�Sr%)r�
rpartitionrer!r!r"rm�szUserString.rpartitioncCs|�|j�|��Sr%)rbr�rstriprbr!r!r"rn�szUserString.rstripcCs|j�||�Sr%)rr��r*rfrir!r!r"r��szUserString.splitcCs|j�||�Sr%)r�rsplitror!r!r"rp�szUserString.rsplitFcCs|j�|�Sr%)r�
splitlines)r*�keependsr!r!r"rq�r�zUserString.splitlinescCs|j�|||�Sr%)rr�)r*�prefixrFrGr!r!r"r��szUserString.startswithcCs|�|j�|��Sr%)rbr�striprbr!r!r"rt�r�zUserString.stripcCs|�|j���Sr%)rbr�swapcaser)r!r!r"ru�r�zUserString.swapcasecCs|�|j���Sr%)rbr�titler)r!r!r"rv�r�zUserString.titlecGs|�|jj|��Sr%)rbr�	translater<r!r!r"rw�szUserString.translatecCs|�|j���Sr%)rbr�upperr)r!r!r"rx�r�zUserString.uppercCs|�|j�|��Sr%)rbr�zfill)r*rCr!r!r"ry�r�zUserString.zfill)rHrI)rO)N)r�)N)Nr�)Nr�)F)N)Irr-r.r@r/rdr1r3r5r7r�rorrrrr�r�r�r�r!r#r,r�r>r?r@rArR�maxsizer�rJrMrPrRr�rSrrTrUrVrWrXr�rYrZr[r\r]r^r�r_r`rar��	maketransrdr�rjrkrlrmrnr�rprqr�rtrurvrwrxryr!r!r!r"rrs�








)7rtrr�operatorrr~rrr�keywordr
r��sysrR�heapqr��_weakrefrr:�	itertoolsrr�rr�rr��reprlibrry�_collectionsr�ImportError�MutableSequence�registerrr#�KeysViewr$�	ItemsViewr/�
ValuesViewr2rxr3rLrr{rr�rrur	rr�Sequencerr!r!r!r"�<module>sh
�Y&}nMS

Hacked By AnonymousFox1.0, Coded By AnonymousFox