Your IP : 3.137.219.213


Current Path : /opt/alt/python311/lib64/python3.11/collections/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/collections/__pycache__/__init__.cpython-311.opt-1.pyc

�

c��f2�����dZgd�ZddlZddlZddlmZddlmZ	ddlm
Zddlm
ZddlmZdd	lmZdd
lmZddlmZ	ddlmZej�e��n#e$rYnwxYw	dd
lmZn#e$rYnwxYwGd�dej ��Z!Gd�dej"��Z#Gd�dej$��Z%Gd�de&��Z'Gd�de(��Z)	ddlm)Z)n#e$rYnwxYw	ddlm*Z*n#e$rd�Z*YnwxYwdddd�d�Z+d�Z,	ddlm,Z,n#e$rYnwxYwGd �d!e(��Z-Gd"�d#ej.��Z/Gd$�d%ej.��Z0Gd&�d'ej��Z1Gd(�d)ej2��Z3dS)*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

)	�ChainMap�Counter�OrderedDict�UserDict�UserList�
UserString�defaultdict�deque�
namedtuple�N)�chain)�repeat)�starmap)�	iskeyword)�eq)�
itemgetter)�recursive_repr)�proxy)r	)rc��eZdZd�ZdS)�_OrderedDictKeysViewc#�>K�t|j��Ed{V��dS�N��reversed�_mapping��selfs �;/opt/alt/python311/lib64/python3.11/collections/__init__.py�__reversed__z!_OrderedDictKeysView.__reversed__<s.�����D�M�*�*�*�*�*�*�*�*�*�*�*�N��__name__�
__module__�__qualname__r�rrrr:s#������+�+�+�+�+rrc��eZdZd�ZdS)�_OrderedDictItemsViewc#�ZK�t|j��D]}||j|fV��dSrr�r�keys  rrz"_OrderedDictItemsView.__reversed__AsD�����D�M�*�*�	,�	,�C���
�c�*�+�+�+�+�+�	,�	,rNr r$rrr&r&?s#������,�,�,�,�,rr&c��eZdZd�ZdS)�_OrderedDictValuesViewc#�VK�t|j��D]}|j|V��dSrrr(s  rrz#_OrderedDictValuesView.__reversed__Gs?�����D�M�*�*�	%�	%�C��-��$�$�$�$�$�	%�	%rNr r$rrr+r+Es#������%�%�%�%�%rr+c��eZdZdZdS)�_Link)�prev�nextr)�__weakref__N)r!r"r#�	__slots__r$rrr.r.Ks������4�I�I�Irr.c�B�eZdZdZd�Zdd�Zejee	fd�Zej
fd�Z
d�Zd�Zd	�Z
dd�Zdd�Zd
�ZejjxZZd�Zd�Zd�ZejjZe��Zefd�Zdd�Ze��d���Zd�Zd�Z e!dd���Z"d�Z#d�Z$d�Z%d�Z&dS)rz)Dictionary that remembers insertion orderc��t�|��}t��|_t	|j��x|_}|x|_|_i|_|S)zDCreate the ordered dict object and set up the underlying structures.)	�dict�__new__r.�_OrderedDict__hardroot�_proxy�_OrderedDict__rootr/r0�_OrderedDict__map)�cls�args�kwdsr�roots     rr6zOrderedDict.__new__]sN���|�|�C� � ���'�'���#�D�O�4�4�4���d� $�$��	�D�I���
��rr$c�"�|j|fi|��dS)z�Initialize an ordered dictionary.  The signature is the same as
        regular dictionaries.  Keyword argument order is preserved.
        N)�_OrderedDict__update)r�otherr=s   r�__init__zOrderedDict.__init__fs$��	��
�e�$�$�t�$�$�$�$�$rc���||vrO|��x|j|<}|j}|j}|||c|_|_|_||_||��|_||||��dS)z!od.__setitem__(i, y) <==> od[i]=yN)r:r9r/r0r))	rr)�value�dict_setitemr�Link�linkr>�lasts	         r�__setitem__zOrderedDict.__setitem__lsw��
�d�?�?�%)�T�V�V�+�D�J�s�O�d��;�D��9�D�-1�4��*�D�I�t�y�$�(��D�I���d���D�I���T�3��&�&�&�&�&rc��|||��|j�|��}|j}|j}||_||_d|_d|_dS)z od.__delitem__(y) <==> del od[y]N)r:�popr/r0)rr)�dict_delitemrG�	link_prev�	link_nexts      r�__delitem__zOrderedDict.__delitem__zsW��	��T�3�����z�~�~�c�"�"���I�	��I�	�"�	��"�	����	���	�	�	rc#�ZK�|j}|j}||ur|jV�|j}||u�dSdS)zod.__iter__() <==> iter(od)N)r9r0r)�rr>�currs   r�__iter__zOrderedDict.__iter__��L�����{���y���$����(�N�N�N��9�D��$������rc#�ZK�|j}|j}||ur|jV�|j}||u�dSdS)z#od.__reversed__() <==> reversed(od)N)r9r/r)rQs   rrzOrderedDict.__reversed__�rTrc��|j}|x|_|_|j���t
�|��dS)z.od.clear() -> None.  Remove all items from od.N)r9r/r0r:�clearr5)rr>s  rrWzOrderedDict.clear�sC���{�� $�$��	�D�I��
�������
�
�4�����rTc��|std���|j}|r|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)�KeyErrorr9r/r0r)r:r5rK)rrHr>rGrMrNr)rDs        r�popitemzOrderedDict.popitem�s���
�	2��0�1�1�1��{���		"��9�D��	�I�!�I�N�!�D�I�I��9�D��	�I�!�D�I�!�I�N��h���J�s�O�����s�#�#���E�z�rc��|j|}|j}|j}|j}||_||_|j}|r%|j}||_||_||_||_dS|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:r/r0r9)	rr)rHrGrMrN�	soft_linkr>�firsts	         r�move_to_endzOrderedDict.move_to_end�s���
�z�#����I�	��I�	��N�	�"�	��"�	���{���	��9�D��D�I��D�I�!�D�I��D�I�I�I��I�E��D�I��D�I�"�E�J��D�I�I�Irc���tj}t|��dz}||j��}|||j��dzz
}|||j��|zz
}|||j��|zz
}|S)N��)�_sys�	getsizeof�len�__dict__r:r7r9)r�sizeof�n�sizes    r�
__sizeof__zOrderedDict.__sizeof__�s�������I�I��M���v�d�m�$�$�����t�z�"�"�Q�&�&�����t��'�'�!�+�+�����t�{�#�#�a�'�'���rc� �t|��S)z:D.keys() -> a set-like object providing a view on D's keys)rrs r�keyszOrderedDict.keys�s��#�D�)�)�)rc� �t|��S)z<D.items() -> a set-like object providing a view on D's items)r&rs r�itemszOrderedDict.items�s��$�T�*�*�*rc� �t|��S)z6D.values() -> an object providing a view on D's values)r+rs r�valueszOrderedDict.values�s��%�d�+�+�+rc��|j}t�|||��}||urF|j�|��}|j}|j}||_||_d|_d|_|S||urt
|���|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.

        N)�_OrderedDict__markerr5rKr:r/r0rY)rr)�default�marker�resultrGrMrNs        rrKzOrderedDict.pop�s���������$��V�,�,�������:�>�>�#�&�&�D��	�I��	�I�&�I�N�&�I�N��D�I��D�I��M��f����3�-�-���rNc�(�||vr||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$�rr)rrs   r�
setdefaultzOrderedDict.setdefaults%��
�$�;�;���9����S�	��rc��|s|jj�d�S|jj�dt|������d�S)zod.__repr__() <==> repr(od)�()�(�))�	__class__r!�listrmrs r�__repr__zOrderedDict.__repr__sL���	7�!�^�4�4�4�6�6��>�2�2�2�D������4F�4F�4F�4F�G�Grc��|���}|r�t|t��r|\}}ni}|���}|���}t	t����D].}|�|d��|�|d���/|r||f}n|pd}|jd|dt|�	����fS)z%Return state information for picklingNr$)
�__getstate__�
isinstance�tuple�copy�varsrrKr|�iterrm)r�state�slots�ks    r�
__reduce__zOrderedDict.__reduce__s����!�!�#�#���
	&��%��'�'�
�$���u�u����J�J�L�L�E��J�J�L�L�E��+�-�-�(�(�
#�
#���	�	�!�T�"�"�"��	�	�!�T�"�"�"�"��
&��u�����
����~�r�5�$��T�Z�Z�\�\�0B�0B�B�Brc�,�|�|��S)z!od.copy() -> a shallow copy of od�r|rs rr�zOrderedDict.copy%����~�~�d�#�#�#rc�.�|��}|D]}|||<�|S)zYCreate a new ordered dictionary with keys from iterable and values set to value.
        r$)r;�iterablerDrr)s     r�fromkeyszOrderedDict.fromkeys)s.���s�u�u���	�	�C��D��I�I��rc���t|t��r>t�||��o"t	tt||����St�||��S)z�od.__eq__(y) <==> od==y.  Comparison to another OD is order-sensitive
        while comparison to a regular mapping is order-insensitive.

        )r�rr5�__eq__�all�map�_eq�rrAs  rr�zOrderedDict.__eq__2sX��
�e�[�)�)�	K��;�;�t�U�+�+�J��C��T�5�4I�4I�0J�0J�J��{�{�4��'�'�'rc�0�|�|��|Sr)�updater�s  r�__ior__zOrderedDict.__ior__;s�����E�����rc��t|t��stS|�|��}|�|��|Sr�r�r5�NotImplementedr|r��rrA�news   r�__or__zOrderedDict.__or__?sB���%��&�&�	"�!�!��n�n�T�"�"���
�
�5�����
rc��t|t��stS|�|��}|�|��|Srr�r�s   r�__ror__zOrderedDict.__ror__FsB���%��&�&�	"�!�!��n�n�U�#�#���
�
�4�����
r)r$)Tr)'r!r"r#�__doc__r6rBr5rIr8r.rOrSrrWrZr^ri�_collections_abc�MutableMappingr�r@rkrmro�__ne__�objectrqrKrw�_recursive_reprr~r�r��classmethodr�r�r�r�r�r$rrrrNs������/�/����%�%�%�%�"&�!1��e�'�'�'�'�-1�,<������������������.����2���)�7�>�>�F�X�*�*�*�+�+�+�,�,�,��
,�
3�F��v�x�x�H�'�����,�����_���H�H���H�C�C�C�&$�$�$������[��(�(�(�����������rr)r)�_tuplegetterc�>�tt|��|���S)N)�doc)�property�_itemgetter)�indexr�s  r�<lambda>r�\s��h�{�5�/A�/A�s�&K�&K�&K�rF)�rename�defaults�modulec�	����������t�t��r(��dd������t	tt������t
jt|����}|r|t��}t���D]^\}}|�
��r(t|��s|�d��s||vrd|���|<|�
|���_|g�zD]n}t|��turtd���|�
��st!d|�����t|��rt!d|������ot��}�D]V}|�d��r|st!d|�����||vrt!d|�����|�
|���Wi}|��t#|��}t%|��t%���krtd
���t't)t	t+t)���t)|����������}t#ttj������t%����d����}	�dkr|	dz
}	d
d�d��D����zdz�t"j�t&t"t$t
t*f\������id|��d�}
d|	�d|	�d�}t1||
��}d|_d|�d
|	�d�|_|�||_t8���fd���}
d|�d�|
j_��fd�}d|�d�|_�fd�}��fd�}�fd�}||
j||||fD]}|�d |j��|_�|�d
|	�d�d!�|||
||||�d"�}t���D]/\}}t
jd#|����}t?||��||<�0t|t"f|��}|�F	t
j d��j!�"d$d%��}n#tFt f$rYnwxYw|�||_$|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�, r`rzc3� K�|]	}|�d�V��
dS)z=%rNr$)�.0�names  r�	<genexpr>znamedtuple.<locals>.<genexpr>�s(����D�D��$�|�|�|�D�D�D�D�D�Drr{�namedtuple_)�
_tuple_new�__builtins__r!z
lambda _cls, z: _tuple_new(_cls, (z))r6zCreate new instance of c����||��}�|���kr"td��dt|�������|S)Nz	Expected z arguments, got )�	TypeErrorrd)r;r�rt�_len�
num_fields�	tuple_news   ���r�_makeznamedtuple.<locals>._make�sQ�����3��)�)���4��<�<�:�%�%��Q�
�Q�Q�C��K�K�Q�Q�R�R�R��
rzMake a new z# object from a sequence or iterablec���|��|j�|����}|rtdt|�������|S)NzGot unexpected field names: )r�rK�
ValueErrorr})rr=rt�_map�field_namess   ��r�_replaceznamedtuple.<locals>._replace�sO������D�D���;��=�=�>�>���	L��J�D��J�J�J�J�K�K�K��
rz
Return a new z2 object replacing specified fields with new valuesc�(��|jj�|zzS)z/Return a nicely formatted representation string)r|r!)r�repr_fmts �rr~znamedtuple.<locals>.__repr__�s����~�&��D��8�8rc�8����|j|����S)z9Return a new dict which maps field names to their values.)�_fields)r�_dict�_zips ��r�_asdictznamedtuple.<locals>._asdict�s!����u�T�T�$�,��-�-�.�.�.rc����|��S)z7Return self as a plain tuple.  Used by copy and pickle.r$)r�_tuples �r�__getnewargs__z"namedtuple.<locals>.__getnewargs__�s����v�d�|�|�r�.r$)r�r2r��_field_defaultsr6r�r�r~r�r��__match_args__zAlias for field number r!�__main__)%r��str�replace�splitr}r�rb�intern�set�	enumerate�isidentifier�
_iskeyword�
startswith�add�typer�r�r�rdr5r�zip�joinr6�evalr!r��__defaults__r��__func__r#r��	_getframe�	f_globals�get�AttributeErrorr")�typenamer�r�r�r��seenr�r��field_defaults�arg_list�	namespace�coder6r�r�r~r�r��method�class_namespacer�rtr�r�r�r�r�r�r�r�s `                    @@@@@@@@rr
r
^s������������4�+�s�#�#�<�!�)�)�#�s�3�3�9�9�;�;���s�3��,�,�-�-�K��{�3�x�=�=�)�)�H�
���u�u��$�[�1�1�	�	�K�E�4��%�%�'�'�
1��d�#�#�
1��?�?�3�'�'�
1��4�<�<�%0��[�[��E�"��H�H�T�N�N�N�N��
�[�(�3�3����:�:�S� � ��H�I�I�I�� � �"�"�	7��6�-1�6�6�7�7�
7��d���	3��2�)-�2�2�3�3�
3�	3��5�5�D������?�?�3���	*��	*��)� $�)�)�*�*�
*��4�<�<��J�$�J�J�K�K�K����������N�����?�?���x�=�=�3�{�+�+�+�+��F�G�G�G��h�t�C���0E�0E�08��0B�0B�-D�-D�(E�(E�F�F�G�G����D�K��5�5�6�6�K��[�!�!�J��y�y��%�%�H��Q����C����T�Y�Y�D�D��D�D�D�D�D�D�s�J�H��
�I�&*�E�3��S�&@�#�E�6�4��t�
 ��,�(�,�,���I�
F�8�E�E��E�E�E�D��4��#�#�G� �G��F��F�F�8�F�F�F�G�O���'�����������[��,�H�,�,�,�E�N��������1��1�1�1�H��9�9�9�9�9�/�/�/�/�/�/������	�
������
�>�>��"*�=�=�F�O�=�=����
�,�,��,�,�,���)������(�%���O�!��-�-�9�9���t��k�;�E�;�;�<�<�� ,�U�C� 8� 8�����
�(�U�H�o�
6�
6�F��~�	��^�A�&�&�0�4�4�Z��L�L�F�F���
�+�	�	�	��D�	����
��"����Ms�7-Q%�%Q9�8Q9c�B�|j}|D]}||d��dz||<�dS)z!Tally elements from the iterable.rr`N)r�)�mappingr��mapping_get�elems    r�_count_elementsr�
s>���+�K��1�1��#��D�!�,�,�q�0���
�
�1�1r)r�c����eZdZdZd �fd�	Zd�Zd�Zd d�Zd�Ze	d d���Z
d �fd	�	Zd d
�Zd�Z
d�Z�fd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!�xZ"S)!ra�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)]

    Nc�d��t�����|j|fi|��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)�superrBr�)rr�r=r|s   �rrBzCounter.__init__Ks;���	�����������H�%�%��%�%�%�%�%rc��dS)z1The count of elements not in the Counter is zero.rr$r(s  r�__missing__zCounter.__missing__Ys	���qrc�D�t|�����S)zSum of the counts)�sumrors r�totalz
Counter.total^s���4�;�;�=�=�!�!�!rc���|�1t|���td��d���Sddl}|�||���td�����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)]

        Nr`T)r)�reverser)r))�sortedrmr��heapq�nlargest)rrgrs   r�most_commonzCounter.most_commonbs]��
�9��$�*�*�,�,�K��N�N�D�I�I�I�I�	�����~�~�a������;�q�>�>�~�B�B�Brc�t�tjtt|�������S)aIterator 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
        >>> import math
        >>> prime_factors = Counter({2: 2, 3: 3, 17: 1})
        >>> math.prod(prime_factors.elements())
        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�_repeatrmrs r�elementszCounter.elementsrs'��$�#�H�W�d�j�j�l�l�$C�$C�D�D�Drc� �td���)Nz@Counter.fromkeys() is undefined.  Use Counter(iterable) instead.)�NotImplementedError)r;r��vs   rr�zCounter.fromkeys�s��"�N�P�P�	Prc�B��|��t|tj��rX|r4|j}|���D]\}}|||d��z||<�n2t���|��nt||��|r|�|��dSdS)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)r�r��Mappingr�rmr�r�r�)rr�r=�self_getr��countr|s      �rr�zCounter.update�s����(���(�$4�$<�=�=�	
0��-�#�x�H�'/�~�~�'7�'7�?�?���e�%*�X�X�d�A�->�->�%>��T�
�
�?��G�G�N�N�8�,�,�,�,���h�/�/�/��	��K�K�������	�	rc��|�e|j}t|tj��r-|���D]\}}||d��|z
||<�n|D]}||d��dz
||<�|r|�|��dSdS)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

        Nrr`)r�r�r�rrm�subtract)rr�r=rr�rs      rrzCounter.subtract�s��� ���x�H��(�$4�$<�=�=�
7�#+�>�>�#3�#3�;�;�K�D�%�!)��$��!2�!2�U�!:�D��J�J�;�%�7�7�D�!)��$��!2�!2�Q�!6�D��J�J��	 ��M�M�$������	 �	 rc�,�|�|��S)zReturn a shallow copy.r�rs rr�zCounter.copy�r�rc�0�|jt|��ffSr)r|r5rs rr�zCounter.__reduce__�s���~��T�
�
�}�,�,rc�V��||vr#t���|��dSdS)zGLike dict.__delitem__() but does not raise KeyError for missing values.N)r�rO)rr�r|s  �rrOzCounter.__delitem__�s1����4�<�<��G�G����%�%�%�%�%��<rc���|s|jj�d�S	t|�����}n#t$rt|��}YnwxYw|jj�d|�d�S)Nryrzr{)r|r!r5rr�)r�ds  rr~zCounter.__repr__�s����	2��n�-�1�1�1�1�	��T�%�%�'�'�(�(�A�A���	�	�	��T�
�
�A�A�A�	�����.�)�2�2�A�2�2�2�2s�!5�A�Ac�z���t�t��stSt��fd���fD����S)z=True if all counts agree. Missing counts are treated as zero.c3�F�K�|]}|D]}�|�|kV���dSrr$�r��c�erArs   ��rr�z!Counter.__eq__.<locals>.<genexpr>�=�����I�I�1�q�I�I�!�4��7�e�A�h�&�I�I�I�I�I�I�Ir�r�rr�r�r�s``rr�zCounter.__eq__
�F�����%��)�)�	"�!�!��I�I�I�I�I��u�
�I�I�I�I�I�Irc�H�t|t��stS||kS)z@True if any counts disagree. Missing counts are treated as zero.�r�rr�r�s  rr�zCounter.__ne__s'���%��)�)�	"�!�!��5�=� � rc�z���t�t��stSt��fd���fD����S)z:True if all counts in self are a subset of those in other.c3�F�K�|]}|D]}�|�|kV���dSrr$rs   ��rr�z!Counter.__le__.<locals>.<genexpr>rrr r�s``r�__le__zCounter.__le__r!rc�R�t|t��stS||ko||kS)zATrue if all counts in self are a proper subset of those in other.r#r�s  r�__lt__zCounter.__lt__�-���%��)�)�	"�!�!��u�}�.����.rc�z���t�t��stSt��fd���fD����S)z<True if all counts in self are a superset of those in other.c3�F�K�|]}|D]}�|�|kV���dSrr$rs   ��rr�z!Counter.__ge__.<locals>.<genexpr>&rrr r�s``r�__ge__zCounter.__ge__"r!rc�R�t|t��stS||ko||kS)zCTrue if all counts in self are a proper superset of those in other.r#r�s  r�__gt__zCounter.__gt__(r)rc��t|t��stSt��}|���D]\}}|||z}|dkr|||<�|���D]\}}||vr|dkr|||<�|S)zAdd counts from two counters.

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

        r�r�rr�rm�rrArtr�r�newcounts      r�__add__zCounter.__add__.s����%��)�)�	"�!�!������:�:�<�<�	(�	(�K�D�%��u�T�{�*�H��!�|�|�'��t��� �;�;�=�=�	%�	%�K�D�%��4���E�A�I�I�$��t����
rc��t|t��stSt��}|���D]\}}|||z
}|dkr|||<�|���D]\}}||vr|dkrd|z
||<�|S)z� Subtract count, but keep only results with positive counts.

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

        rr0r1s      r�__sub__zCounter.__sub__As����%��)�)�	"�!�!������:�:�<�<�	(�	(�K�D�%��u�T�{�*�H��!�|�|�'��t��� �;�;�=�=�	)�	)�K�D�%��4���E�A�I�I� �5�y��t����
rc��t|t��stSt��}|���D]"\}}||}||kr|n|}|dkr|||<�#|���D]\}}||vr|dkr|||<�|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})

        rr0�rrArtr�r�other_countr2s       rr�zCounter.__or__Ts����%��)�)�	"�!�!������:�:�<�<�	(�	(�K�D�%���+�K�&+�k�&9�&9�{�{�u�H��!�|�|�'��t��� �;�;�=�=�	%�	%�K�D�%��4���E�A�I�I�$��t����
rc���t|t��stSt��}|���D]"\}}||}||kr|n|}|dkr|||<�#|S)z� Intersection is the minimum of corresponding counts.

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

        rr0r7s       r�__and__zCounter.__and__hst���%��)�)�	"�!�!������:�:�<�<�	(�	(�K�D�%���+�K� %�� 3� 3�u�u��H��!�|�|�'��t����
rc�l�t��}|���D]\}}|dkr|||<�|S)zEAdds an empty counter, effectively stripping negative and zero countsr�rrm�rrtr�rs    r�__pos__zCounter.__pos__ys>�������:�:�<�<�	%�	%�K�D�%��q�y�y�$��t����
rc�r�t��}|���D]\}}|dkrd|z
||<�|S)z{Subtracts from an empty counter.  Strips positive and zero counts,
        and flips the sign on negative counts.

        rr<r=s    r�__neg__zCounter.__neg__�sD��
�����:�:�<�<�	)�	)�K�D�%��q�y�y� �5�y��t����
rc�R�d�|���D��}|D]}||=�|S)z?Internal method to strip elements with a negative or zero countc�$�g|]
\}}|dk�|��S)rr$)r�r�rs   r�
<listcomp>z*Counter._keep_positive.<locals>.<listcomp>�s!��M�M�M���e�5�1�9�9�t�9�9�9r)rm)r�nonpositiver�s   r�_keep_positivezCounter._keep_positive�s:��M�M�t�z�z�|�|�M�M�M���	�	�D��T�
�
��rc�~�|���D]\}}||xx|z
cc<�|���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})

        �rmrE�rrAr�rs    r�__iadd__zCounter.__iadd__��I��!�;�;�=�=�	 �	 �K�D�%���J�J�J�%��J�J�J�J��"�"�$�$�$rc�~�|���D]\}}||xx|zcc<�|���S)z�Inplace subtract counter, but keep only results with positive counts.

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

        rGrHs    r�__isub__zCounter.__isub__�rJrc��|���D]\}}||}||kr|||<�|���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})

        rG)rrAr�r8rs     rr�zCounter.__ior__�sP��"'�����	)�	)��D�+���J�E��U�"�"�(��T�
���"�"�$�$�$rc��|���D]\}}||}||kr|||<�|���S)z�Inplace intersection is the minimum of corresponding counts.

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

        rG)rrAr�rr8s     r�__iand__zCounter.__iand__�sO�� �:�:�<�<�	)�	)�K�D�%���+�K��U�"�"�(��T�
���"�"�$�$�$rr)#r!r"r#r�rBr�r�rrr�r�r�rr�r�rOr~r�r�r&r(r,r.r3r5r�r:r>r@rErIrLr�rO�
__classcell__r�s@rrrs6�������*�*�d&�&�&�&�&�&����
"�"�"�C�C�C�C� E�E�E�,�	P�	P�	P��[�	P� � � � � � �D � � � �6$�$�$�-�-�-�&�&�&�&�&�
	3�	3�	3�ZJ�J�J�!�!�!�J�J�J�/�/�/�J�J�J�/�/�/����&���&���(���"���	�	�	����%�%�%�%�%�%�
%�
%�
%�
%�
%�
%�
%�
%�
%�
%rrc���eZdZdZd�Zd�Zd�Zdd�Zd�Zd�Z	d	�Z
d
�Ze��d���Z
ed���Zd
�ZeZdd�Zed���Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZdS)ra� 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.

    c�4�t|��pig|_dS)z�Initialize a ChainMap by setting *maps* to the given mappings.
        If no mappings are provided, a single empty dictionary is used.

        N)r}�maps)rrSs  rrBzChainMap.__init__�s��
��J�J�&�2�$��	�	�	rc� �t|���r)rYr(s  rr�zChainMap.__missing__�s���s�m�m�rc�t�|jD]}	||cS#t$rY�wxYw|�|��Sr)rSrYr�)rr)r�s   r�__getitem__zChainMap.__getitem__�s\���y�	�	�G�
��s�|�#�#�#���
�
�
���
��������$�$�$s��
"�"Nc��||vr||n|Srr$rvs   rr�zChainMap.get�s���4�K�K�t�C�y�y�W�4rc�R�tt��j|j���Sr)rdr��unionrSrs r�__len__zChainMap.__len__�s���;�3�5�5�;��	�*�+�+�+rc��i}t|j��D]/}|�t�|�����0t|��Sr)rrSr�r5r�r�)rrr�s   rrSzChainMap.__iter__�sL������	�*�*�	-�	-�G�
�H�H�T�]�]�7�+�+�,�,�,�,��A�w�w�rc�D��t�fd�|jD����S)Nc3� �K�|]}�|vV��	dSrr$)r��mr)s  �rr�z(ChainMap.__contains__.<locals>.<genexpr>�s'�����/�/��3�!�8�/�/�/�/�/�/r��anyrSr(s `r�__contains__zChainMap.__contains__�s(����/�/�/�/�T�Y�/�/�/�/�/�/rc�*�t|j��Srr_rs r�__bool__zChainMap.__bool__�����4�9�~�~�rc�|�|jj�dd�tt|j�����d�S)Nrzr�r{)r|r!r�r��reprrSrs rr~zChainMap.__repr__s6���.�)�N�N�D�I�I�c�$��	�6J�6J�,K�,K�N�N�N�Nrc�8�|tj|g|�R���S)z?Create a ChainMap with a single dict created from the iterable.)r5r�)r;r�r<s   rr�zChainMap.fromkeyss&���s�4�=��1�D�1�1�1�2�2�2rc�r�|j|jd���g|jdd��R�S)zHNew ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]rr`N)r|rSr�rs rr�z
ChainMap.copys8���t�~�d�i��l�/�/�1�1�B�D�I�a�b�b�M�B�B�B�Brc�`�|�|}n|r|�|��|j|g|j�R�S)z�New ChainMap with a new map followed by all previous maps.
        If no map is provided, an empty dict is used.
        Keyword arguments update the map or new empty dict.
        )r�r|rS)rr^�kwargss   r�	new_childzChainMap.new_childsF��

�9��A�A�
�	�
�H�H�V�����t�~�a�,�$�)�,�,�,�,rc�0�|j|jdd��S)zNew ChainMap from maps[1:].r`N)r|rSrs r�parentszChainMap.parentss���t�~�t�y����}�-�-rc�&�||jd|<dS�Nr)rS)rr)rDs   rrIzChainMap.__setitem__!s��!��	�!��S���rc�d�	|jd|=dS#t$rtd|�����wxYw)Nr�$Key not found in the first mapping: )rSrYr(s  rrOzChainMap.__delitem__$sR��	K��	�!��S�!�!�!���	K�	K�	K��I�#�I�I�J�J�J�	K���s��/c�|�	|jd���S#t$rtd���wxYw)zPRemove and return an item pair from maps[0]. Raise KeyError is maps[0] is empty.rz#No keys found in the first mapping.)rSrZrYrs rrZzChainMap.popitem*sN��	B��9�Q�<�'�'�)�)�)���	B�	B�	B��@�A�A�A�	B���s�!�;c�v�	|jdj|g|�R�S#t$rtd|�����wxYw)zWRemove *key* from maps[0] and return its value. Raise KeyError if *key* not in maps[0].rrq)rSrKrY)rr)r<s   rrKzChainMap.pop1s_��	K�#�4�9�Q�<�#�C�/�$�/�/�/�/���	K�	K�	K��I�#�I�I�J�J�J�	K���s��8c�D�|jd���dS)z'Clear maps[0], leaving maps[1:] intact.rN)rSrWrs rrWzChainMap.clear8s ���	�!��������rc�F�|jd�|��|Sro)rSr�r�s  rr�zChainMap.__ior__<s!���	�!����E�"�"�"��rc��t|tj��stS|���}|jd�|��|Sro)r�r�rr�r�rSr�)rrAr^s   rr�zChainMap.__or__@sJ���%�!1�!9�:�:�	"�!�!��I�I�K�K��	��q�	��������rc���t|tj��stSt	|��}t|j��D]}|�|���|�|��Sr)	r�r�rr�r5rrSr�r|)rrAr^�childs    rr�zChainMap.__ror__Gse���%�!1�!9�:�:�	"�!�!���K�K���d�i�(�(�	�	�E�
�H�H�U�O�O�O�O��~�~�a� � � rr)r!r"r#r�rBr�rVr�rZrSrarcr�r~r�r�r��__copy__rkr�rmrIrOrZrKrWr�r�r�r$rrrr�s���������'�'�'����%�%�%�5�5�5�5�,�,�,����0�0�0�����_���O�O���O��3�3��[�3�C�C�C��H�	-�	-�	-�	-��.�.��X�.�"�"�"�K�K�K�B�B�B�K�K�K����������!�!�!�!�!rrc�v�eZdZdd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�Zd�Zedd���ZdS)rNc�t�i|_|�|�|��|r|�|��dSdSr)�datar�)rr5rjs   rrBzUserDict.__init__WsK����	����K�K������	 ��K�K�������	 �	 rc�*�t|j��Sr�rdr|rs rrZzUserDict.__len__^rdrc��||jvr
|j|St|jd��r|j�||��St	|���)Nr�)r|�hasattrr|r�rYr(s  rrVzUserDict.__getitem__asS���$�)����9�S�>�!��4�>�=�1�1�	9��>�-�-�d�C�8�8�8��s�m�m�rc��||j|<dSr�r|)rr)�items   rrIzUserDict.__setitem__hs����	�#���rc��|j|=dSrr�r(s  rrOzUserDict.__delitem__ks���I�c�N�N�Nrc�*�t|j��Sr)r�r|rs rrSzUserDict.__iter__n����D�I���rc��||jvSrr�r(s  rrazUserDict.__contains__rs���d�i��rc�*�t|j��Sr�rfr|rs rr~zUserDict.__repr__vr�rc���t|t��r"|�|j|jz��St|t��r|�|j|z��St
Sr�r�rr|r|r5r�r�s  rr�zUserDict.__or__ys`���e�X�&�&�	:��>�>�$�)�e�j�"8�9�9�9��e�T�"�"�	5��>�>�$�)�e�"3�4�4�4��rc���t|t��r"|�|j|jz��St|t��r|�||jz��St
Srr�r�s  rr�zUserDict.__ror__�s`���e�X�&�&�	:��>�>�%�*�t�y�"8�9�9�9��e�T�"�"�	5��>�>�%�$�)�"3�4�4�4��rc�|�t|t��r|xj|jzc_n|xj|zc_|Sr)r�rr|r�s  rr�zUserDict.__ior__�s=���e�X�&�&�	��I�I���#�I�I�I��I�I���I�I��rc���|j�|j��}|j�|j��|jd���|jd<|S�Nr|)r|r6rer�r��r�insts  rryzUserDict.__copy__�sU���~�%�%�d�n�5�5���
���T�]�+�+�+� $�
�f� 5� :� :� <� <��
�f���rc��|jtur&t|j�����Sddl}|j}	i|_|�|��}||_n#||_wxYw|�|��|Sro)r|rr|r�r�)rr�r|rs    rr�z
UserDict.copy�s����>�X�%�%��D�I�N�N�,�,�-�-�-������y��	��D�I��	�	�$���A��D�I�I���D�I�����	��������s�A%�%	A.c�.�|��}|D]}|||<�|Srr$)r;r�rDrr)s     rr�zUserDict.fromkeys�s,���C�E�E���	�	�C��A�c�F�F��rr)r!r"r#rBrZrVrIrOrSrar~r�r�r�ryr�r�r�r$rrrrTs������� � � � ���������������� � � ������������������������[���rrc���eZdZdZd"d�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�Zd�Zd�Zd�Zd�Zd�Zd�ZeZd�Zd�Zd�Zd�Zd#d�Zd�Zd�Zd�Zd�Zd�Zd�Z d �Z!d!�Z"dS)$rzAA more or less complete user-defined wrapper around list objects.Nc�
�g|_|�yt|��t|j��kr||jdd�<dSt|t��r|jdd�|jdd�<dSt	|��|_dSdSr)r|r�r�rr})r�initlists  rrBzUserList.__init__�s�����	����H�~�~��d�i���0�0�'��	�!�!�!�����H�h�/�/�
+�'�}�Q�Q�Q�/��	�!�!�!���� ��N�N��	�	�	� �rc�*�t|j��Srr�rs rr~zUserList.__repr__�r�rc�>�|j|�|��kSr�r|�_UserList__castr�s  rr(zUserList.__lt__�����y�4�;�;�u�-�-�-�-rc�>�|j|�|��kSrr�r�s  rr&zUserList.__le__�����y�D�K�K��.�.�.�.rc�>�|j|�|��kSrr�r�s  rr�zUserList.__eq__�r�rc�>�|j|�|��kSrr�r�s  rr.zUserList.__gt__�r�rc�>�|j|�|��kSrr�r�s  rr,zUserList.__ge__�r�rc�>�t|t��r|jn|Sr)r�rr|r�s  r�__castzUserList.__cast�s��'��x�8�8�C�u�z�z�e�Crc��||jvSrr��rr�s  rrazUserList.__contains__�s���t�y� � rc�*�t|j��Srr~rs rrZzUserList.__len__�rdrc��t|t��r |�|j|��S|j|Sr)r��slicer|r|�r�is  rrVzUserList.__getitem__�s8���a����	 ��>�>�$�)�A�,�/�/�/��9�Q�<�rc��||j|<dSrr��rr�r�s   rrIzUserList.__setitem__�s����	�!���rc��|j|=dSrr�r�s  rrOzUserList.__delitem__�s���I�a�L�L�Lrc�B�t|t��r"|�|j|jz��St|t	|j����r|�|j|z��S|�|jt|��z��Sr�r�rr|r|r�r}r�s  rr3zUserList.__add__�s����e�X�&�&�	5��>�>�$�)�e�j�"8�9�9�9�
��t�D�I���
/�
/�	5��>�>�$�)�e�"3�4�4�4��~�~�d�i�$�u�+�+�5�6�6�6rc�B�t|t��r"|�|j|jz��St|t	|j����r|�||jz��S|�t|��|jz��Srr�r�s  r�__radd__zUserList.__radd__�s����e�X�&�&�	5��>�>�%�*�t�y�"8�9�9�9�
��t�D�I���
/�
/�	5��>�>�%�$�)�"3�4�4�4��~�~�d�5�k�k�D�I�5�6�6�6rc��t|t��r|xj|jz
c_nPt|t|j����r|xj|z
c_n|xjt	|��z
c_|Sr)r�rr|r�r}r�s  rrIzUserList.__iadd__�so���e�X�&�&�	%��I�I���#�I�I�I�
��t�D�I���
/�
/�	%��I�I���I�I�I��I�I��e���$�I�I��rc�<�|�|j|z��Sr�r|r|�rrgs  r�__mul__zUserList.__mul__�����~�~�d�i�!�m�,�,�,rc�&�|xj|zc_|Srr�r�s  r�__imul__zUserList.__imul__�s���	�	�Q��	�	��rc��|j�|j��}|j�|j��|jddd�|jd<|Sr�)r|r6rer�r�s  rryzUserList.__copy__sR���~�%�%�d�n�5�5���
���T�]�+�+�+� $�
�f� 5�a�a�a� 8��
�f���rc�:�|j�|��dSr)r|�appendr�s  rr�zUserList.append
����	��������rc�<�|j�||��dSr)r|�insertr�s   rr�zUserList.insert
s ���	����D�!�!�!�!�!r���c�6�|j�|��Sr)r|rKr�s  rrKzUserList.pops���y�}�}�Q���rc�:�|j�|��dSr)r|�remover�s  rr�zUserList.remover�rc�8�|j���dSr)r|rWrs rrWzUserList.clears���	�������rc�,�|�|��Srr�rs rr�z
UserList.copys���~�~�d�#�#�#rc�6�|j�|��Sr)r|rr�s  rrzUserList.counts���y���t�$�$�$rc�(�|jj|g|�R�Sr�r|r�)rr�r<s   rr�zUserList.indexs���t�y��t�+�d�+�+�+�+rc�8�|j���dSr)r|rrs rrzUserList.reverse"s���	�������rc�*�|jj|i|��dSr)r|�sort�rr<r=s   rr�z
UserList.sort%s!����	���%��%�%�%�%�%rc��t|t��r!|j�|j��dS|j�|��dSr)r�rr|�extendr�s  rr�zUserList.extend(sN���e�X�&�&�	$��I���U�Z�(�(�(�(�(��I���U�#�#�#�#�#rr�r�)#r!r"r#r�rBr~r(r&r�r.r,r�rarZrVrIrOr3r�rIr��__rmul__r�ryr�r�rKr�rWr�rr�rr�r�r$rrrr�s�������K�K�	+�	+�	+�	+����.�.�.�/�/�/�/�/�/�.�.�.�/�/�/�D�D�D�!�!�!���� � � �������7�7�7�7�7�7����-�-�-��H����������"�"�"� � � � �������$�$�$�%�%�%�,�,�,����&�&�&�$�$�$�$�$rrc�4�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�ZeZd�Zd�Zd�Zd�Zd�Zdejfd�Zd�Zd�Z dKd�Z!dejfd �Z"dLd"�Z#dejfd#�Z$d$�Z%d%�Z&dejfd&�Z'd'�Z(d(�Z)d)�Z*d*�Z+d+�Z,d,�Z-d-�Z.d.�Z/d/�Z0d0�Z1d1�Z2d2�Z3d3�Z4d4�Z5d5�Z6dMd7�Z7e8j9Z9d8�Z:dNd:�Z;dejfd;�Z<dejfd<�Z=d=�Z>d>�Z?dMd?�Z@dOd@�ZAdOdA�ZBdPdC�ZCdejfdD�ZDdMdE�ZEdF�ZFdG�ZGdH�ZHdI�ZIdJ�ZJd6S)Qrc��t|t��r	||_dSt|t��r|jdd�|_dSt|��|_dSr)r�r�r|r�r�seqs  rrBzUserString.__init__5sW���c�3���	!��D�I�I�I�
��Z�
(�
(�	!�������D�I�I�I��C���D�I�I�Irc�*�t|j��Sr)r�r|rs r�__str__zUserString.__str__=rdrc�*�t|j��Srr�rs rr~zUserString.__repr__@r�rc�*�t|j��Sr)�intr|rs r�__int__zUserString.__int__Crdrc�*�t|j��Sr)�floatr|rs r�	__float__zUserString.__float__Fs���T�Y���rc�*�t|j��Sr)�complexr|rs r�__complex__zUserString.__complex__Is���t�y�!�!�!rc�*�t|j��Sr)�hashr|rs r�__hash__zUserString.__hash__Lr�rc�"�|jdd�fSrr�rs rr�zUserString.__getnewargs__Os���	�!�!�!���rc�b�t|t��r|j|jkS|j|kSr�r�rr|�r�strings  rr�zUserString.__eq__R�0���f�j�)�)�	,��9���+�+��y�F�"�"rc�b�t|t��r|j|jkS|j|kSrr�r�s  rr(zUserString.__lt__W�0���f�j�)�)�	+��9�v�{�*�*��y�6�!�!rc�b�t|t��r|j|jkS|j|kSrr�r�s  rr&zUserString.__le__\r�rc�b�t|t��r|j|jkS|j|kSrr�r�s  rr.zUserString.__gt__ar�rc�b�t|t��r|j|jkS|j|kSrr�r�s  rr,zUserString.__ge__fr�rc�L�t|t��r|j}||jvSrr�)r�chars  rrazUserString.__contains__ks(���d�J�'�'�	��9�D��t�y� � rc�*�t|j��Srr~rs rrZzUserString.__len__prdrc�B�|�|j|��Srr�)rr�s  rrVzUserString.__getitem__ss���~�~�d�i��.�/�/�/rc�(�t|t��r"|�|j|jz��St|t��r|�|j|z��S|�|jt	|��z��Sr)r�rr|r|r�r�s  rr3zUserString.__add__vsy���e�Z�(�(�	5��>�>�$�)�e�j�"8�9�9�9�
��s�
#�
#�	5��>�>�$�)�e�"3�4�4�4��~�~�d�i�#�e�*�*�4�5�5�5rc��t|t��r|�||jz��S|�t|��|jz��Sr)r�r�r|r|r�s  rr�zUserString.__radd__}sL���e�S�!�!�	5��>�>�%�$�)�"3�4�4�4��~�~�c�%�j�j�4�9�4�5�5�5rc�<�|�|j|z��Srr�r�s  rr�zUserString.__mul__�r�rc�<�|�|j|z��Srr��rr<s  r�__mod__zUserString.__mod__�s���~�~�d�i�$�.�/�/�/rc�L�|�t|��|z��Sr)r|r�)r�templates  r�__rmod__zUserString.__rmod__�s���~�~�c�(�m�m�d�2�3�3�3rc�Z�|�|j�����Sr)r|r|�
capitalizers rr�zUserString.capitalize�s"���~�~�d�i�2�2�4�4�5�5�5rc�Z�|�|j�����Sr)r|r|�casefoldrs rr�zUserString.casefold��"���~�~�d�i�0�0�2�2�3�3�3rc�N�|�|jj|g|�R���Sr)r|r|�center�r�widthr<s   rrzUserString.center�s,���~�~�.�d�i�.�u�<�t�<�<�<�=�=�=rrc�r�t|t��r|j}|j�|||��Sr)r�rr|r�r�sub�start�ends    rrzUserString.count��3���c�:�&�&�	��(�C��y���s�E�3�/�/�/rc��t|t��r|j}|�|j�|����Sr)r�rr|r|�removeprefix)r�prefixs  rrzUserString.removeprefix��=���f�j�)�)�	!��[�F��~�~�d�i�4�4�V�<�<�=�=�=rc��t|t��r|j}|�|j�|����Sr)r�rr|r|�removesuffix)r�suffixs  rrzUserString.removesuffix�r
r�utf-8�strictc�P�|�dn|}|�dn|}|j�||��S)Nrr)r|�encode)r�encoding�errorss   rrzUserString.encode�s5��&�.�7�7�H��#�^������y����&�1�1�1rc�:�|j�|||��Sr)r|�endswith)rrrrs    rrzUserString.endswith�s���y�!�!�&�%��5�5�5r�c�\�|�|j�|����Sr)r|r|�
expandtabs)r�tabsizes  rrzUserString.expandtabs�s$���~�~�d�i�2�2�7�;�;�<�<�<rc�r�t|t��r|j}|j�|||��Sr)r�rr|�findrs    rrzUserString.find�s3���c�:�&�&�	��(�C��y�~�~�c�5�#�.�.�.rc�&�|jj|i|��Sr)r|�formatr�s   rr zUserString.format�s���t�y���.��.�.�.rc�6�|j�|��Sr)r|�
format_map)rr�s  rr"zUserString.format_map�s���y�#�#�G�,�,�,rc�:�|j�|||��Srr�rs    rr�zUserString.index�s���y���s�E�3�/�/�/rc�4�|j���Sr)r|�isalphars rr%zUserString.isalpha�����y� � �"�"�"rc�4�|j���Sr)r|�isalnumrs rr(zUserString.isalnum�r&rc�4�|j���Sr)r|�isasciirs rr*zUserString.isascii�r&rc�4�|j���Sr)r|�	isdecimalrs rr,zUserString.isdecimal�����y�"�"�$�$�$rc�4�|j���Sr)r|�isdigitrs rr/zUserString.isdigit�r&rc�4�|j���Sr)r|r�rs rr�zUserString.isidentifier�s���y�%�%�'�'�'rc�4�|j���Sr)r|�islowerrs rr2zUserString.islower�r&rc�4�|j���Sr)r|�	isnumericrs rr4zUserString.isnumeric�r-rc�4�|j���Sr)r|�isprintablers rr6zUserString.isprintable�s���y�$�$�&�&�&rc�4�|j���Sr)r|�isspacers rr8zUserString.isspace�r&rc�4�|j���Sr)r|�istitlers rr:zUserString.istitle�r&rc�4�|j���Sr)r|�isupperrs rr<zUserString.isupper�r&rc�6�|j�|��Sr)r|r�r�s  rr�zUserString.join�s���y�~�~�c�"�"�"rc�N�|�|jj|g|�R���Sr)r|r|�ljustrs   rr?zUserString.ljust��*���~�~�o�d�i�o�e�;�d�;�;�;�<�<�<rc�Z�|�|j�����Sr)r|r|�lowerrs rrBzUserString.lower�� ���~�~�d�i�o�o�/�/�0�0�0rNc�\�|�|j�|����Sr)r|r|�lstrip�r�charss  rrEzUserString.lstrip��$���~�~�d�i�.�.�u�5�5�6�6�6rc�6�|j�|��Sr)r|�	partition�r�seps  rrJzUserString.partition�s���y�"�"�3�'�'�'rr�c���t|t��r|j}t|t��r|j}|�|j�|||����Sr)r�rr|r|r�)r�oldr��maxsplits    rr�zUserString.replace�sZ���c�:�&�&�	��(�C��c�:�&�&�	��(�C��~�~�d�i�/�/��S�(�C�C�D�D�Drc�r�t|t��r|j}|j�|||��Sr)r�rr|�rfindrs    rrQzUserString.rfind�r	rc�:�|j�|||��Sr)r|�rindexrs    rrSzUserString.rindexs���y����U�C�0�0�0rc�N�|�|jj|g|�R���Sr)r|r|�rjustrs   rrUzUserString.rjustr@rc�6�|j�|��Sr)r|�
rpartitionrKs  rrWzUserString.rpartitions���y�#�#�C�(�(�(rc�\�|�|j�|����Sr)r|r|�rstriprFs  rrYzUserString.rstrip	rHrc�8�|j�||��Sr)r|r��rrLrOs   rr�zUserString.splits���y���s�H�-�-�-rc�8�|j�||��Sr)r|�rsplitr[s   rr]zUserString.rsplits���y����X�.�.�.rFc�6�|j�|��Sr)r|�
splitlines)r�keependss  rr_zUserString.splitliness���y�#�#�H�-�-�-rc�:�|j�|||��Sr)r|r�)rrrrs    rr�zUserString.startswiths���y�#�#�F�E�3�7�7�7rc�\�|�|j�|����Sr)r|r|�striprFs  rrczUserString.strip�"���~�~�d�i�o�o�e�4�4�5�5�5rc�Z�|�|j�����Sr)r|r|�swapcasers rrfzUserString.swapcaser�rc�Z�|�|j�����Sr)r|r|�titlers rrhzUserString.titlerCrc�F�|�|jj|���Sr)r|r|�	translater�s  rrjzUserString.translate!s!���~�~�1�d�i�1�4�8�9�9�9rc�Z�|�|j�����Sr)r|r|�upperrs rrlzUserString.upper$rCrc�\�|�|j�|����Sr)r|r|�zfill)rrs  rrnzUserString.zfill'rdr)rr)rrr�)Nr�)F)Kr!r"r#rBr�r~r�r�r�r�r�r�r(r&r.r,rarZrVr3r�r�r�r�r�r�r�rrb�maxsizerrrrrrrr r"r�r%r(r*r,r/r�r2r4r6r8r:r<r�r?rBrEr��	maketransrJr�rQrSrUrWrYr�r]r_r�rcrfrhrjrlrnr$rrrr3s�������!�!�!���������� � � �"�"�"�������#�#�#�
"�"�"�
#�#�#�
"�"�"�
#�#�#�
!�!�!�
���0�0�0�6�6�6�6�6�6�
-�-�-��H�0�0�0�4�4�4�6�6�6�4�4�4�>�>�>� !�d�l�0�0�0�0�
>�>�>�
>�>�>�
2�2�2�2�
&'�D�L�6�6�6�6�=�=�=�=� �T�\�/�/�/�/�
/�/�/�-�-�-� !�d�l�0�0�0�0�#�#�#�#�#�#�#�#�#�%�%�%�#�#�#�(�(�(�#�#�#�%�%�%�'�'�'�#�#�#�#�#�#�#�#�#�#�#�#�=�=�=�1�1�1�7�7�7�7��
�I�(�(�(�E�E�E�E� !�d�l�0�0�0�0�
!"�t�|�1�1�1�1�=�=�=�)�)�)�7�7�7�7�.�.�.�.�/�/�/�/�.�.�.�.�()�d�l�8�8�8�8�6�6�6�6�4�4�4�1�1�1�:�:�:�1�1�1�6�6�6�6�6rr)4r��__all__r��sysrb�	itertoolsrrr
r
rr	�keywordrr��operatorrr�rr��reprlibrr��_weakrefrr8�_collectionsr	�MutableSequence�register�ImportErrorr�KeysViewr�	ItemsViewr&�
ValuesViewr+r�r.r5rr�r
r�rr�rrr�Sequencerr$rr�<module>r�sK���� 
�
�
����������%�%�%�%�%�%�'�'�'�'�'�'�)�)�)�)�)�)�+�+�+�+�+�+�������.�.�.�.�.�.�5�5�5�5�5�5�$�$�$�$�$�$�5�"�"�"�"�"�"��$�-�-�e�4�4�4�4���	�	�	��D�	����
	�(�(�(�(�(�(�(���	�	�	��D�	����+�+�+�+�+�+�4�+�+�+�
,�,�,�,�,�,�6�,�,�,�%�%�%�%�%�-�8�%�%�%�5�5�5�5�5�F�5�5�5�}�}�}�}�}�$�}�}�}�@	�(�(�(�(�(�(�(���	�	�	��D�	����L�)�)�)�)�)�)�)���L�L�L�K�K�L�L�L�L����16��T�h�h�h�h�h�^1�1�1�	�,�,�,�,�,�,�,���	�	�	��D�	����q%�q%�q%�q%�q%�d�q%�q%�q%�p
}!�}!�}!�}!�}!��.�}!�}!�}!�HS�S�S�S�S��.�S�S�S�t~$�~$�~$�~$�~$��/�~$�~$�~$�Ju6�u6�u6�u6�u6�!�*�u6�u6�u6�u6�u6sZ�A!�!A)�(A)�-A4�4A<�;A<�C�C$�#C$�(C/�/C:�9C:�	D�D�D

?>