
    du                         d Z ddlmZmZ ddlZ eee                   Z ed          Z	d Z
 ee
          Z[
g dZdZ e ed                    Z e e e                                Z e ei                                                     Z e ei                                                     Z e ei                                                     Z e eg                     Z e e eg                               Z e e ed                              Z e e ed	d
z                                Z e e e                                Z e ed                    Z  e ed                    Z! e e e"                                Z# ei                                           Z$ ei                                           Z% ei                                           Z& eej'                  Z( e d                       Z)d Z* e*            Z* ee*          Z+e*,                                 [*d Z- e-            Z- ee-          Z.[-d Z/ G d de          Z0 G d de          Z1 G d de1          Z2e23                    e+            G d de          Z4 G d de4          Z5 G d de5          Z6e63                    e.            G d de          Z7 G d  d!e7          Z8e83                    e           e83                    e           e83                    e           e83                    e           e83                    e           e83                    e           e83                    e           e83                    e           e83                    e           e83                    e           e83                    e            e83                    e!           e83                    e#            G d" d#e7          Z9 G d$ d%e8          Z:e:3                    e)            G d& d'e          Z; G d( d)e          Z< G d* d+e;e7e<          Z= G d, d-e          Z>d. Z?d/ Z@ G d0 d1e          ZA G d2 d3e=          ZBeB3                    eC            G d4 d5eB          ZDeD3                    e            G d6 d7e=          ZEeE3                    e(            G d8 d9e;          ZF G d: d;eFeB          ZGeG3                    e$            G d< d=eFeB          ZHeH3                    e&            G d> d?eFe=          ZIeI3                    e%            G d@ dAeE          ZJeJ3                    eK            G dB dCe9e=          ZLeL3                    eM           eL3                    eN           eL3                    e           eL3                    eO            G dD dEeL          ZPeP3                    eQ           eP3                    e            G dF dGeL          ZReR3                    e           eR3                    e           dS )HzjAbstract Base Classes (ABCs) for collections, according to PEP 3119.

Unit tests are in test_collections.
    )ABCMetaabstractmethodN.c                      d S N r       "lib/python3.11/_collections_abc.py_fr
      s      r   )	Awaitable	CoroutineAsyncIterableAsyncIteratorAsyncGeneratorHashableIterableIterator	Generator
ReversibleSized	ContainerCallable
CollectionSet
MutableSetMappingMutableMappingMappingViewKeysView	ItemsView
ValuesViewSequenceMutableSequence
ByteStringzcollections.abcr      i   r   c               #      K   d V S r   r   r   r   r	   <lambda>r'   >   s      5555r   c                  
   K   d S r   r   r   r   r	   _coror)   @   s
        r   c                    K   d W V  d S r   r   r   r   r	   _agr+   F   s      r   c                     | j         }|D ]3}|D ]%}||j        v r|j        |         t          c c S  n
&t          c S 4dS )NT)__mro____dict__NotImplemented)CmethodsmromethodBs        r	   _check_methodsr5   N   sw    
)C " " 	" 	"A##:f%-)))))) $
 "!!!  4r   c                   >    e Zd ZdZed             Zed             ZdS )r   r   c                     dS Nr   r   selfs    r	   __hash__zHashable.__hash__^       qr   c                 B    | t           u rt          |d          S t          S )Nr;   )r   r5   r/   clsr0   s     r	   __subclasshook__zHashable.__subclasshook__b   !    (??!!Z000r   N)__name__
__module____qualname__	__slots__r   r;   classmethodr@   r   r   r	   r   r   Z   M        I  ^   [  r   r   )	metaclassc                   T    e Zd ZdZed             Zed             Z ee          Z	dS )r   r   c              #      K   d V  d S r   r   r9   s    r	   	__await__zAwaitable.__await__m   s      r   c                 B    | t           u rt          |d          S t          S )NrK   )r   r5   r/   r>   s     r	   r@   zAwaitable.__subclasshook__q   s#    )!![111r   N)
rB   rC   rD   rE   r   rK   rF   r@   GenericAlias__class_getitem__r   r   r	   r   r   i   s[        I  ^   [
 $L11r   r   c                   \    e Zd ZdZed             Zedd            Zd Zed             Z	dS )r   r   c                     t           )zcSend a value into the coroutine.
        Return next yielded value or raise StopIteration.
        StopIterationr:   values     r	   sendzCoroutine.send~   
    
 r   Nc                 T    ||| |            }||                     |          }|)zgRaise an exception in the coroutine.
        Return next yielded value or raise StopIteration.
        with_tracebackr:   typvaltbs       r	   throwzCoroutine.throw   ;    
 ;z	#%%C>$$R((C	r   c                     	 |                      t                     t          d          # t          t          f$ r Y dS w xY w).Raise GeneratorExit inside coroutine.
        zcoroutine ignored GeneratorExitNr^   GeneratorExitRuntimeErrorrR   r9   s    r	   closezCoroutine.close   T    	BJJ}%%% @AAA }- 	 	 	DD	   + A A c                 H    | t           u rt          |dddd          S t          S )NrK   rU   r^   re   )r   r5   r/   r>   s     r	   r@   zCoroutine.__subclasshook__   s)    )!![&'7KKKr   NN)
rB   rC   rD   rE   r   rU   r^   re   rF   r@   r   r   r	   r   r   z   s        I  ^ 
 
 
 ^
B B B   [  r   r   c                   T    e Zd ZdZed             Zed             Z ee          Z	dS )r   r   c                     t                      S r   )r   r9   s    r	   	__aiter__zAsyncIterable.__aiter__   s    r   c                 B    | t           u rt          |d          S t          S )Nrl   )r   r5   r/   r>   s     r	   r@   zAsyncIterable.__subclasshook__   s#    -!![111r   N)
rB   rC   rD   rE   r   rl   rF   r@   rM   rN   r   r   r	   r   r      s[        I  ^   [
 $L11r   r   c                   D    e Zd ZdZed             Zd Zed             ZdS )r   r   c                    K   t           )z@Return the next item or raise StopAsyncIteration when exhausted.StopAsyncIterationr9   s    r	   	__anext__zAsyncIterator.__anext__   s       ! r   c                     | S r   r   r9   s    r	   rl   zAsyncIterator.__aiter__       r   c                 D    | t           u rt          |dd          S t          S )Nrr   rl   )r   r5   r/   r>   s     r	   r@   zAsyncIterator.__subclasshook__   s%    -!![+>>>r   N)	rB   rC   rD   rE   r   rr   rl   rF   r@   r   r   r	   r   r      s\        I! ! ^!     [  r   r   c                   b    e Zd ZdZd Zed             Zedd            Zd Ze	d             Z
dS )	r   r   c                 <   K   |                      d           d{V S )zpReturn the next item from the asynchronous generator.
        When exhausted, raise StopAsyncIteration.
        N)asendr9   s    r	   rr   zAsyncGenerator.__anext__   s,       ZZ%%%%%%%%%r   c                    K   t           )zuSend a value into the asynchronous generator.
        Return next yielded value or raise StopAsyncIteration.
        rp   rS   s     r	   rx   zAsyncGenerator.asend   s      
 ! r   Nc                 X   K   ||| |            }||                     |          }|)zyRaise an exception in the asynchronous generator.
        Return next yielded value or raise StopAsyncIteration.
        rX   rZ   s       r	   athrowzAsyncGenerator.athrow   s?      
 ;z	#%%C>$$R((C	r   c                    K   	 |                      t                     d{V  t          d          # t          t          f$ r Y dS w xY w)ra   Nz,asynchronous generator ignored GeneratorExit)r{   rc   rd   rq   r9   s    r	   aclosezAsyncGenerator.aclose   sk      	O++m,,,,,,,,, MNNN 12 	 	 	DD	s    3 AAc                 J    | t           u rt          |ddddd          S t          S )Nrl   rr   rx   r{   r}   )r   r5   r/   r>   s     r	   r@   zAsyncGenerator.__subclasshook__   s2    .  !![+")8X? ? ?r   ri   )rB   rC   rD   rE   rr   r   rx   r{   r}   rF   r@   r   r   r	   r   r      s        I& & & ! ! ^! 
 
 
 ^
O O O   [  r   r   c                   T    e Zd ZdZed             Zed             Z ee          Z	dS )r   r   c              #   
   K   d S r   r   r9   s    r	   __iter__zIterable.__iter__        	 	r   c                 B    | t           u rt          |d          S t          S )Nr   )r   r5   r/   r>   s     r	   r@   zIterable.__subclasshook__  rA   r   N)
rB   rC   rD   rE   r   r   rF   r@   rM   rN   r   r   r	   r   r      s[        I  ^   [
 $L11r   r   c                   D    e Zd ZdZed             Zd Zed             ZdS )r   r   c                     t           )zKReturn the next item from the iterator. When exhausted, raise StopIterationrQ   r9   s    r	   __next__zIterator.__next__  s
     r   c                     | S r   r   r9   s    r	   r   zIterator.__iter__  rt   r   c                 D    | t           u rt          |dd          S t          S )Nr   r   )r   r5   r/   r>   s     r	   r@   zIterator.__subclasshook__  s#    (??!!Z<<<r   N)	rB   rC   rD   rE   r   r   r   rF   r@   r   r   r	   r   r     s\        I  ^     [  r   r   c                   >    e Zd ZdZed             Zed             ZdS )r   r   c              #   
   K   d S r   r   r9   s    r	   __reversed__zReversible.__reversed__6  r   r   c                 D    | t           u rt          |dd          S t          S )Nr   r   )r   r5   r/   r>   s     r	   r@   zReversible.__subclasshook__;  s%    *!!^Z@@@r   N)rB   rC   rD   rE   r   r   rF   r@   r   r   r	   r   r   2  sM        I  ^   [  r   r   c                   b    e Zd ZdZd Zed             Zedd            Zd Ze	d             Z
dS )	r   r   c                 ,    |                      d          S )z^Return the next item from the generator.
        When exhausted, raise StopIteration.
        N)rU   r9   s    r	   r   zGenerator.__next__F  s     yyr   c                     t           )zcSend a value into the generator.
        Return next yielded value or raise StopIteration.
        rQ   rS   s     r	   rU   zGenerator.sendL  rV   r   Nc                 T    ||| |            }||                     |          }|)zgRaise an exception in the generator.
        Return next yielded value or raise StopIteration.
        rX   rZ   s       r	   r^   zGenerator.throwS  r_   r   c                     	 |                      t                     t          d          # t          t          f$ r Y dS w xY w)z.Raise GeneratorExit inside generator.
        zgenerator ignored GeneratorExitNrb   r9   s    r	   re   zGenerator.close`  rf   rg   c                 J    | t           u rt          |ddddd          S t          S )Nr   r   rU   r^   re   )r   r5   r/   r>   s     r	   r@   zGenerator.__subclasshook__j  s2    )!!Z"('7< < <r   ri   )rB   rC   rD   rE   r   r   rU   r^   re   rF   r@   r   r   r	   r   r   B  s        I     ^ 
 
 
 ^
B B B   [  r   r   c                   >    e Zd ZdZed             Zed             ZdS )r   r   c                     dS r8   r   r9   s    r	   __len__zSized.__len__y  r<   r   c                 B    | t           u rt          |d          S t          S )Nr   )r   r5   r/   r>   s     r	   r@   zSized.__subclasshook__}  s!    %<<!!Y///r   N)rB   rC   rD   rE   r   r   rF   r@   r   r   r	   r   r   u  rG   r   r   c                   T    e Zd ZdZed             Zed             Z ee          Z	dS )r   r   c                     dS NFr   )r:   xs     r	   __contains__zContainer.__contains__      ur   c                 B    | t           u rt          |d          S t          S )Nr   )r   r5   r/   r>   s     r	   r@   zContainer.__subclasshook__  s#    )!!^444r   N)
rB   rC   rD   rE   r   r   rF   r@   rM   rN   r   r   r	   r   r     s[        I  ^   [
 $L11r   r   c                   (    e Zd ZdZed             ZdS )r   r   c                 F    | t           u rt          |ddd          S t          S )Nr   r   r   )r   r5   r/   r>   s     r	   r@   zCollection.__subclasshook__  s'    *!!i^LLLr   N)rB   rC   rD   rE   rF   r@   r   r   r	   r   r     s2        I  [  r   r   c                   @     e Zd ZdZdZ fdZ fdZd Z fdZ xZ	S )_CallableGenericAliasz Represent `Callable[argtypes, resulttype]`.

    This sets ``__args__`` to a tuple containing the flattened ``argtypes``
    followed by ``resulttype``.

    Example: ``Callable[[int, str], float]`` sets ``__args__`` to
    ``(int, str, float)``.
    r   c                 L   t          |t                    rt          |          dk    st          d          |\  }}t          |t          t          f          rg ||R }n!t          |          st          d|           t                                          | ||          S )N   z6Callable must be used as Callable[[arg, ...], result].zFExpected a list of types, an ellipsis, ParamSpec, or Concatenate. Got )
isinstancetuplelen	TypeErrorlist_is_param_exprsuper__new__)r?   originargst_argst_result	__class__s        r	   r   z_CallableGenericAlias.__new__  s    4'' 	JCIINNHJ J Jfudm,, 	H&V&X&&DD'' 	H G>DG G H H HwwsFD111r   c                 >   t          | j                  dk    r:t          | j        d                   r t                                                      S dd                    d | j        d d         D                        dt          | j        d                    dS )	Nr   r   zcollections.abc.Callable[[z, c                 ,    g | ]}t          |          S r   )
_type_repr).0as     r	   
<listcomp>z2_CallableGenericAlias.__repr__.<locals>.<listcomp>  s    JJJ!
1JJJr   z], ])r   __args__r   r   __repr__joinr   )r:   r   s    r	   r   z_CallableGenericAlias.__repr__  s    t}""~dmA6F'G'G"77##%%%4YYJJt}SbS7IJJJKK4 4dmB/004 4 4 	5r   c                     | j         }t          |          dk    rt          |d                   st          |d d                   |d         f}t          t
          |ffS )Nr   r   r   )r   r   r   r   r   r   )r:   r   s     r	   
__reduce__z _CallableGenericAlias.__reduce__  sT    }D		Q>$q'#:#:SbS	??DH,D$x&666r   c                    t          |t                    s|f}t          | j                  dk    r4t	          | j        d                   r|rt	          |d                   s|f}t                                          |          j        }t          |d         t          t          f          s|d         }|d d         }||f}t          t          t          |                    S )Nr$   r   r   )r   r   r   __parameters__r   r   __getitem__r   r   r   r   )r:   itemnew_argsr   r   r   s        r	   r   z!_CallableGenericAlias.__getitem__  s     $&& 	7D #$$))"4#6q#9:: * *!/Q!8!8 * 7D77&&t,,5 (1+t}55 	*|Hcrc]F)H$XuX???r   )
rB   rC   rD   __doc__rE   r   r   r   r   __classcell__)r   s   @r	   r   r     s          I
2 
2 
2 
2 
25 5 5 5 57 7 7@ @ @ @ @ @ @ @ @r   r   c                       t           u rdS t           t                    rdS t                      d} j        dk    ot           fd|D                       S )z|Checks if obj matches either a list of types, ``...``, ``ParamSpec`` or
    ``_ConcatenateGenericAlias`` from typing.py
    T)	ParamSpec_ConcatenateGenericAliastypingc              3   .   K   | ]}j         |k    V  d S r   )rB   )r   nameobjs     r	   	<genexpr>z!_is_param_expr.<locals>.<genexpr>  s*      -U-Utcld.B-U-U-U-U-U-Ur   )Ellipsisr   r   typerC   any)r   namess   ` r	   r   r     si     ht#t t
s))C5E>X%U#-U-U-U-Uu-U-U-U*U*UUr   c                 &   t          | t                    rt          |           S t          | t                    r#| j        dk    r| j        S | j         d| j         S | t          u rdS t          | t                    r| j        S t          |           S )zReturn the repr() of an object, special-casing types (internal helper).

    Copied from :mod:`typing` since collections.abc
    shouldn't depend on that module.
    builtins.z...)	r   rM   reprr   rC   rD   r   FunctionTyperB   )r   s    r	   r   r     s     #|$$ Cyy#t 6>Z''##.553#3555
hu#|$$ |99r   c                   T    e Zd ZdZed             Zed             Z ee          Z	dS )r   r   c                     dS r   r   )r:   r   kwdss      r	   __call__zCallable.__call__   r   r   c                 B    | t           u rt          |d          S t          S )Nr   )r   r5   r/   r>   s     r	   r@   zCallable.__subclasshook__  rA   r   N)
rB   rC   rD   rE   r   r   rF   r@   r   rN   r   r   r	   r   r     s\        I  ^   [
 $$9::r   r   c                       e Zd ZdZdZd Zd Zd Zd Zd Z	e
d             Zd	 ZeZd
 Zd ZeZd Zd Zd ZeZd ZdS )r   aZ  A 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.
    r   c                     t          |t                    st          S t          |           t          |          k    rdS | D ]	}||vr dS 
dS NFTr   r   r/   r   r:   otherelems      r	   __le__z
Set.__le__  sa    %%% 	"!!t99s5zz!!5 	 	D5  uu !tr   c                     t          |t                    st          S t          |           t          |          k     o|                     |          S r   r   r   r/   r   r   r:   r   s     r	   __lt__z
Set.__lt__'  B    %%% 	"!!4yy3u::%<$++e*<*<<r   c                     t          |t                    st          S t          |           t          |          k    o|                     |          S r   )r   r   r/   r   __ge__r   s     r	   __gt__z
Set.__gt__,  r   r   c                     t          |t                    st          S t          |           t          |          k     rdS |D ]	}|| vr dS 
dS r   r   r   s      r	   r   z
Set.__ge__1  sa    %%% 	"!!t99s5zz!!5 	 	D4uu  tr   c                     t          |t                    st          S t          |           t          |          k    o|                     |          S r   r   r   s     r	   __eq__z
Set.__eq__;  sB    %%% 	"!!4yyCJJ&=4;;u+=+==r   c                      | |          S )zConstruct 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?   its     r	   _from_iterablezSet._from_iterable@  s     s2wwr   c                 ~     t          |t                    st          S                       fd|D                       S )Nc              3   $   K   | ]
}|v |V  d S r   r   r   rT   r:   s     r	   r   zSet.__and__.<locals>.<genexpr>L  s'      "M"MUu}}5}}}}"M"Mr   r   r   r/   r   r   s   ` r	   __and__zSet.__and__I  sD    %** 	"!!"""M"M"M"Me"M"M"MMMMr   c                     |D ]	}|| v r dS 
dS )z1Return True if two sets have a null intersection.FTr   )r:   r   rT   s      r	   
isdisjointzSet.isdisjointP  s+     	 	E}}uu tr   c                     t          |t                    st          S d | |fD             }|                     |          S )Nc              3   $   K   | ]}|D ]}|V  d S r   r   )r   ses      r	   r   zSet.__or__.<locals>.<genexpr>Z  s/      55q155a5555555r   r   )r:   r   chains      r	   __or__z
Set.__or__W  sE    %** 	"!!55T5M555""5)))r   c                     t          t                    s1t          t                    st          S |                               |                     fd| D                       S )Nc              3   $   K   | ]
}|v|V  d S r   r   )r   rT   r   s     r	   r   zSet.__sub__.<locals>.<genexpr>d  s9       #: #:U&+5&8&8 $)&8&8&8&8#: #:r   r   r   r   r/   r   r   s    `r	   __sub__zSet.__sub___  s}    %%% 	/eX.. &%%''..E"" #: #: #: #:d #: #: #: : : 	:r   c                      t          |t                    s1t          |t                    st          S                      |          }                      fd|D                       S )Nc              3   $   K   | ]
}|v|V  d S r   r   r   s     r	   r   zSet.__rsub__.<locals>.<genexpr>l  s9       #9 #9U&+4&7&7 $)&7&7&7&7#9 #9r   r  r   s   ` r	   __rsub__zSet.__rsub__g  s}    %%% 	/eX.. &%%''..E"" #9 #9 #9 #9e #9 #9 #9 9 9 	9r   c                     t          |t                    s1t          |t                    st          S |                     |          }| |z
  || z
  z  S r   r  r   s     r	   __xor__zSet.__xor__o  sR    %%% 	/eX.. &%%''..Eu..r   c                    t           j        }d|z  dz   }t          |           }d|dz   z  }||z  }| D ]'}t          |          }|||dz  z  dz  dz  z  }||z  }(||dz	  |dz	  z  z  }|d	z  d
z   }||z  }||k    r||dz   z  }|dk    r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.
        r   r$   iMr   iM[l   4~2       i i6r   i8#)sysmaxsizer   hash)r:   MAXMASKnhr   hxs          r	   _hashz	Set._hashx  s     k3w{II!a% 	T	 	 	AaB"b/H,;;AIAA	a2g!r'""I	!	T	s77MA77Ar   N)rB   rC   rD   r   rE   r   r   r   r   r   rF   r   r   __rand__r   r   __ror__r  r  r  __rxor__r  r   r   r	   r   r     s         I  = = =
= = =
  > > >
   [N N N
 H  * * * G: : :9 9 9/ / / H    r   r   c                   l    e Zd ZdZdZed             Zed             Zd Zd Z	d Z
d Zd	 Zd
 Zd ZdS )r   a  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.
    r   c                     t           )zAdd an element.NotImplementedErrorrS   s     r	   addzMutableSet.add  
     "!r   c                     t           )z8Remove an element.  Do not raise an exception if absent.r  rS   s     r	   discardzMutableSet.discard  r  r   c                 V    || vrt          |          |                     |           dS )z5Remove an element. If not a member, raise a KeyError.N)KeyErrorr  rS   s     r	   removezMutableSet.remove  s1    5//!Ur   c                     t          |           }	 t          |          }n# t          $ r	 t          dw xY w|                     |           |S )z2Return the popped value.  Raise KeyError if empty.N)iternextrR   r!  r  r:   r   rT   s      r	   popzMutableSet.pop  sY    $ZZ	%HHEE 	% 	% 	%$	%Us   ! 4c                 R    	 	 |                                   # t          $ r Y dS w xY w)z6This is slow (creates N new iterators!) but effective.TN)r'  r!  r9   s    r	   clearzMutableSet.clear  s@    	


 	 	 	DD	    
&&c                 :    |D ]}|                      |           | S r   )r  r&  s      r	   __ior__zMutableSet.__ior__  s'     	 	EHHUOOOOr   c                 @    | |z
  D ]}|                      |           | S r   )r  r&  s      r	   __iand__zMutableSet.__iand__  s/    Ri 	  	 ELLr   c                     || u r|                                   n^t          |t                    s|                     |          }|D ]1}|| v r|                     |           |                     |           2| S r   )r)  r   r   r   r  r  r&  s      r	   __ixor__zMutableSet.__ixor__  s    ::JJLLLLb#&& -((,, $ $D==LL''''HHUOOOOr   c                 l    || u r|                                   n|D ]}|                     |           | S r   )r)  r  r&  s      r	   __isub__zMutableSet.__isub__  sC    ::JJLLLL $ $U####r   N)rB   rC   rD   r   rE   r   r  r  r"  r'  r)  r,  r.  r0  r2  r   r   r	   r   r     s        	 	 I" " ^" " " ^"        
  
      r   r   c                   Z    e Zd ZdZdZdZed             ZddZd Z	d Z
d	 Zd
 Zd ZdZdS )r   zA Mapping is a generic container for associating key/value
    pairs.

    This class provides concrete generic implementations of all
    methods except for __getitem__, __iter__, and __len__.
    r   @   c                     t           r   r!  r:   keys     r	   r   zMapping.__getitem__      r   Nc                 8    	 | |         S # t           $ r |cY S w xY w)z<D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None.r6  r:   r8  defaults      r	   getzMapping.get  s5    	9 	 	 	NNN	s   
 c                 :    	 | |          dS # t           $ r Y dS w xY wNTFr6  r7  s     r	   r   zMapping.__contains__
  s;    	II 4  	 	 	55	s    
c                      t          |           S )z:D.keys() -> a set-like object providing a view on D's keys)r   r9   s    r	   keyszMapping.keys  s    ~~r   c                      t          |           S )z<D.items() -> a set-like object providing a view on D's items)r   r9   s    r	   itemszMapping.items  s    r   c                      t          |           S )z6D.values() -> an object providing a view on D's values)r    r9   s    r	   valueszMapping.values  s    $r   c                     t          |t                    st          S t          |                                           t          |                                          k    S r   )r   r   r/   dictrC  r   s     r	   r   zMapping.__eq__  sE    %)) 	"!!DJJLL!!T%++--%8%888r   r   )rB   rC   rD   r   rE   __abc_tpflags__r   r   r=  r   rA  rC  rE  r   r   r   r   r	   r   r     s          I O  ^              9 9 9
 LLLr   r   c                   :    e Zd ZdZd Zd Zd Z ee          Z	dS )r   _mappingc                     || _         d S r   rJ  )r:   mappings     r	   __init__zMappingView.__init__,  s    r   c                 *    t          | j                  S r   )r   rK  r9   s    r	   r   zMappingView.__len__/  s    4=!!!r   c                 ,    d                     |           S )Nz&{0.__class__.__name__}({0._mapping!r}))formatr9   s    r	   r   zMappingView.__repr__2  s    7>>tDDDr   N)
rB   rC   rD   rE   rN  r   r   rF   rM   rN   r   r   r	   r   r   (  sW        I     " " "E E E $L11r   r   c                   4    e Zd ZdZed             Zd Zd ZdS )r   r   c                      t          |          S r   setr   s     r	   r   zKeysView._from_iterable<      2wwr   c                     || j         v S r   rJ  r7  s     r	   r   zKeysView.__contains__@  s    dm##r   c              #   $   K   | j         E d {V  d S r   rJ  r9   s    r	   r   zKeysView.__iter__C  s&      =         r   NrB   rC   rD   rE   rF   r   r   r   r   r   r	   r   r   8  sP        I  [$ $ $! ! ! ! !r   r   c                   4    e Zd ZdZed             Zd Zd ZdS )r   r   c                      t          |          S r   rT  r   s     r	   r   zItemsView._from_iterableN  rV  r   c                 ^    |\  }}	 | j         |         }||u p||k    S # t          $ r Y dS w xY wr   )rK  r!  )r:   r   r8  rT   vs        r	   r   zItemsView.__contains__R  sU    
U	,c"A :+e+  	 	 	55	s    
,,c              #   @   K   | j         D ]}|| j         |         fV  d S r   rJ  r7  s     r	   r   zItemsView.__iter__[  s<      = 	, 	,Cc*+++++	, 	,r   NrY  r   r   r	   r   r   J  sP        I  [, , ,, , , , ,r   r   c                       e Zd ZdZd Zd ZdS )r    r   c                 N    | j         D ]}| j         |         }||u s||k    r dS dS r?  rJ  )r:   rT   r8  r]  s       r	   r   zValuesView.__contains__g  sA    = 	 	Cc"AEzzQ%ZZtt (ur   c              #   <   K   | j         D ]}| j         |         V  d S r   rJ  r7  s     r	   r   zValuesView.__iter__n  s7      = 	% 	%C-$$$$$	% 	%r   N)rB   rC   rD   rE   r   r   r   r   r	   r    r    c  s7        I  % % % % %r   r    c                   |    e Zd ZdZdZed             Zed             Z e            Z	e	fdZ
d Zd ZddZdd
Zd	S )r   zA MutableMapping is a generic container for associating
    key/value pairs.

    This class provides concrete generic implementations of all
    methods except for __getitem__, __setitem__, __delitem__,
    __iter__, and __len__.
    r   c                     t           r   r6  r:   r8  rT   s      r	   __setitem__zMutableMapping.__setitem__  r9  r   c                     t           r   r6  r7  s     r	   __delitem__zMutableMapping.__delitem__  r9  r   c                 V    	 | |         }| |= |S # t           $ r || j        u r |cY S w xY w)zD.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.
        )r!  _MutableMapping__marker)r:   r8  r<  rT   s       r	   r'  zMutableMapping.pop  sT    	IE S	L  	 	 	$-''NNN	s    ((c                     	 t          t          |                     }n# t          $ r	 t          dw xY w| |         }| |= ||fS )zD.popitem() -> (k, v), remove and return some (key, value) pair
           as a 2-tuple; but raise KeyError if D is empty.
        N)r%  r$  rR   r!  rd  s      r	   popitemzMutableMapping.popitem  sY    	%tDzz""CC 	% 	% 	%$	%S	IEzs    2c                 R    	 	 |                                   # t          $ r Y dS w xY w)z,D.clear() -> None.  Remove all items from D.TN)rk  r!  r9   s    r	   r)  zMutableMapping.clear  s@    	 	 	 	DD	r*  c                   t          |t                    r|D ]}||         | |<   n@t          |d          r#|                                D ]}||         | |<   n|D ]
\  }}|| |<   |                                D ]
\  }}|| |<   dS )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
        rA  N)r   r   hasattrrA  rC  )r:   r   r   r8  rT   s        r	   updatezMutableMapping.update  s     eW%% 	" ' '!#JS		'UF## 	"zz|| ' '!#JS		' $ " "
U!S		**,, 	 	JCDII	 	r   Nc                 B    	 | |         S # t           $ r || |<   Y nw xY w|S )z@D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in Dr6  r;  s      r	   
setdefaultzMutableMapping.setdefault  s>    	 9 	  	  	 DIII	 s   
 )r   r   )rB   rC   rD   r   rE   r   re  rg  objectri  r'  rk  r)  ro  rq  r   r   r	   r   r   v  s          I  ^   ^ vxxH'    
 
 
     $     r   r   c                   P    e Zd ZdZdZdZed             Zd Zd Z	d Z
dd
Zd Zd	S )r!   zAll the operations on a read-only sequence.

    Concrete subclasses must override __new__ or __init__,
    __getitem__, and __len__.
    r       c                     t           r   
IndexErrorr:   indexs     r	   r   zSequence.__getitem__      r   c              #   T   K   d}	 	 | |         }|V  |dz  }# t           $ r Y d S w xY w)Nr   Tr$   rv  )r:   ir]  s      r	   r   zSequence.__iter__  sY      	GQ  	 	 	FF	s    
''c                 *    | D ]}||u s||k    r dS dS r?  r   )r:   rT   r]  s      r	   r   zSequence.__contains__  s3     	 	AEzzQ%ZZtt (ur   c              #   v   K   t          t          t          |                               D ]}| |         V  d S r   )reversedranger   )r:   r|  s     r	   r   zSequence.__reversed__  sD      %D		**++ 	 	Aq'MMMM	 	r   r   Nc                    |&|dk     r t          t          |           |z   d          }||dk     r|t          |           z  }|}|||k     r3	 | |         }n# t          $ r Y nw xY w||u s||k    r|S |dz  }|-||k     3t          )zS.index(value, [start, [stop]]) -> integer -- return first index of value.
           Raises ValueError if the value is not present.

           Supporting start and stop arguments is optional, but
           recommended.
        Nr   r$   )maxr   rw  
ValueError)r:   rT   startstopr|  r]  s         r	   ry  zSequence.index  s     D		E)1--EqCIIDla$hhG   EzzQ%ZZFA la$hh s   A 
A$#A$c                 :    t          fd| D                       S )zBS.count(value) -> integer -- return number of occurrences of valuec              3   0   K   | ]}|u s|k    d V  dS )r$   Nr   )r   r]  rT   s     r	   r   z!Sequence.count.<locals>.<genexpr>
  s/      ??a5jjAJJ1JJJJ??r   )sumrS   s    `r	   countzSequence.count  s&    ????d??????r   )r   N)rB   rC   rD   r   rE   rH  r   r   r   r   r   ry  r  r   r   r	   r!   r!     s          I O  ^         .@ @ @ @ @r   r!   c                       e Zd ZdZdZdS )r#   zMThis unifies bytes and bytearray.

    XXX Should add all their methods.
    r   N)rB   rC   rD   r   rE   r   r   r	   r#   r#     s         
 IIIr   r#   c                       e Zd ZdZdZed             Zed             Zed             Zd Z	d Z
d Zd	 ZddZd Zd ZdS )r"   zAll the operations on a read-write sequence.

    Concrete subclasses must provide __new__ or __init__,
    __getitem__, __setitem__, __delitem__, __len__, and insert().
    r   c                     t           r   rv  r:   ry  rT   s      r	   re  zMutableSequence.__setitem__'  rz  r   c                     t           r   rv  rx  s     r	   rg  zMutableSequence.__delitem__+  rz  r   c                     t           )z3S.insert(index, value) -- insert value before indexrv  r  s      r	   insertzMutableSequence.insert/  s
     r   c                 L    |                      t          |           |           dS )z:S.append(value) -- append value to the end of the sequenceN)r  r   rS   s     r	   appendzMutableSequence.append4  s"    CIIu%%%%%r   c                 R    	 	 |                                   # t          $ r Y dS w xY w)z,S.clear() -> None -- remove all items from STN)r'  rw  r9   s    r	   r)  zMutableSequence.clear8  s@    	


 	 	 	DD	r*  c                     t          |           }t          |dz            D ]%}| ||z
  dz
           | |         c| |<   | ||z
  dz
  <   &dS )z!S.reverse() -- reverse *IN PLACE*r   r$   N)r   r  )r:   r  r|  s      r	   reversezMutableSequence.reverse@  s^    IIq!t 	8 	8A#'!A;Q DGT!A#a%[[	8 	8r   c                 `    || u rt          |          }|D ]}|                     |           dS )zMS.extend(iterable) -- extend sequence by appending elements from the iterableN)r   r  )r:   rE  r]  s      r	   extendzMutableSequence.extendF  s@    T>>&\\F 	 	AKKNNNN	 	r   r   c                     | |         }| |= |S )zS.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:   ry  r]  s      r	   r'  zMutableSequence.popM  s     KKr   c                 2    | |                      |          = dS )zvS.remove(value) -- remove first occurrence of value.
           Raise ValueError if the value is not present.
        N)ry  rS   s     r	   r"  zMutableSequence.removeU  s     E""###r   c                 0    |                      |           | S r   )r  )r:   rE  s     r	   __iadd__zMutableSequence.__iadd__[  s    Fr   N)r   )rB   rC   rD   r   rE   r   re  rg  r  r  r)  r  r  r'  r"  r  r   r   r	   r"   r"     s          I  ^   ^   ^& & &  8 8 8     $ $ $    r   r"   )Sr   abcr   r   r  r   r   intrM   EllipsisTyper
   r   __all__rB   r$  bytes_iterator	bytearraybytearray_iteratorrA  dict_keyiteratorrE  dict_valueiteratorrC  dict_itemiteratorlist_iteratorr  list_reverseiteratorr  range_iteratorlongrange_iteratorrU  set_iteratorstr_iteratortuple_iteratorzipzip_iterator	dict_keysdict_values
dict_itemsr.   mappingproxy	generatorr)   	coroutinere   r+   async_generatorr5   r   r   r   registerr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   	frozensetr   r   r   r   r   r    r   rG  r!   r   str
memoryviewr#   bytesr"   r   r   r	   <module>r     s%
   
 ( ' ' ' ' ' ' ' 



tDItCyy tBxx	 	 	  dd3iiT$$yy{{++,, 4RWWYY(( T$$ryy{{++,, Dbhhjj))** TT"XXtDD"..// dd5588nn%%T$$uuQ$Y//0011 tDDKK  tDDHH~~dd2hhtDDKK  DOO	d299;;T"((**
tDM""D///$$%%	   DKK	 	   	cee$s))

 
 
        2 2 2 2 2' 2 2 2 2"& & & & &	 & & &R 
  9   2 2 2 2 2g 2 2 2 2"    M   &- - - - -] - - -`    ( ( (2 2 2 2 2 2 2 2 2$    x   & 	  . ! ! !   $ % % %   " # # #   $ % % %   # $ $ $   -         & ' ' '   . ! ! !   $ % % %   ,      ,      . ! ! !   ,           - - - - - - - -` 
  9       g    2 2 2 2 2' 2 2 2 2"    )   ;@ ;@ ;@ ;@ ;@L ;@ ;@ ;@z
V 
V 
V  &; ; ; ; ; ; ; ; ;(G G G G G* G G GT Y   M M M M M M M M`   C   
1 1 1 1 1j 1 1 1f      2 2 2 2 2% 2 2 2 ! ! ! ! !{C ! ! ! 	  )   , , , , ,S , , ,, 
  :   % % % % %j % % %    K      O O O O OW O O Od      
=@ =@ =@ =@ =@z: =@ =@ =@~ 	  %      #      %      *             E    
  I   ? ? ? ? ?h ? ? ?D          # # # # #r   