
    /Jf                     4   d Z ddlZddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ dd	l	m
Z
 dd
l	mZ efdfdZg dZ G d de
          Z G d de
          Z G d de
          Z G d de          Z G d de          Z G d de          Z G d de
          Z G d deee          Z G d dee          Z G d  d!e          Z G d" d#e          Z G d$ d%e          Z G d& d'e          Z G d( d)e          Z G d* d+e          Z G d, d-e          Z G d. d/ee          Z G d0 d1ee          Z G d2 d3ee          Z  G d4 d5e
          Z! G d6 d7e!          Z" G d8 d9e
          Z# G d: d;e#          Z$ G d< d=e$          Z%dS )>a  
Interface definitions paralleling the abstract base classes defined in
:mod:`collections.abc`.

After this module is imported, the standard library types will declare
that they implement the appropriate interface. While most standard
library types will properly implement that interface (that
is, ``verifyObject(ISequence, list()))`` will pass, for example), a few might not:

    - `memoryview` doesn't feature all the defined methods of
      ``ISequence`` such as ``count``; it is still declared to provide
      ``ISequence`` though.

    - `collections.deque.pop` doesn't accept the ``index`` argument of
      `collections.abc.MutableSequence.pop`

    - `range.index` does not accept the ``start`` and ``stop`` arguments.

.. versionadded:: 5.0.0
    N)ABCMeta)OrderedDict)UserDict)UserList)
UserString)abc)ABCInterface)optional c                     |rt          t          |           S t          | |dd| z  i          }|D ]}|                    |           |S )N__doc__z4The ABC %s is not defined in this version of Python.)getattrr   r   register)nameverbases_if_missingregister_if_missingmissingcs         d/home/alex/cs2snipeproduction/venv/lib/python3.11/site-packages/zope/interface/common/collections.py_new_in_verr   3   sr      "sD!!! d,I
/  G !  N    )IAsyncGeneratorIAsyncIterableIAsyncIterator
IAwaitableICollection
IContainer
ICoroutine
IGenerator	IHashable
IItemsView	IIterable	IIterator	IKeysViewIMappingIMappingViewIMutableMappingIMutableSequenceIMutableSetIReversible	ISequenceISetISizedIValuesViewc                   2    e Zd Zej        Zed             ZdS )r   c                     dS )z
        Optional method. If not provided, the interpreter will use
        ``__iter__`` or the old ``__getitem__`` protocol
        to implement ``in``.
        Nr   others    r   __contains__zIContainer.__contains__c         r   N)__name__
__module____qualname__r   	Containerr
   r4   r   r   r   r   r   `   s4        
-C  X  r   r   c                       e Zd Zej        ZdS )r!   N)r6   r7   r8   r   Hashabler   r   r   r!   r!   k           
,CCCr   r!   c                   2    e Zd Zej        Zed             ZdS )r#   c                      dS z
        Optional method. If not provided, the interpreter will
        implement `iter` using the old ``__getitem__`` protocol.
        Nr   r   r   r   __iter__zIIterable.__iter__q   r5   r   N)r6   r7   r8   r   Iterabler
   r@   r   r   r   r#   r#   n   s4        
,C  X  r   r#   c                       e Zd Zej        ZdS )r$   N)r6   r7   r8   r   Iteratorr   r   r   r$   r$   x   r<   r   r$   c                   d    e Zd Z edde                                f          Zed             ZdS )r+   
ReversibleTc                      dS z
        Optional method. If this isn't present, the interpreter
        will use ``__len__`` and ``__getitem__`` to implement the
        `reversed` builtin.
        Nr   r   r   r   __reversed__zIReversible.__reversed__~   r5   r   N)	r6   r7   r8   r   r#   getABCr   r
   rH   r   r   r   r+   r+   {   sO        
+lD9+;+;+=+=*?
@
@C  X  r   r+   c                   N    e Zd Z edde                                f          ZdS )r    	GeneratorTN)r6   r7   r8   r   r$   rI   r   r   r   r   r    r       s0        
+k4)*:*:*<*<)>
?
?CCCr   r    c                       e Zd Zej        ZdS )r.   N)r6   r7   r8   r   Sizedr   r   r   r.   r.      s        
)CCCr   r.   c                       e Zd Z edde                                e                                e                                f          ZdS )r   
CollectionTN)	r6   r7   r8   r   r.   rI   r#   r   r   r   r   r   r   r      sQ         +lD}}	(8(8(:(:J<M<M<O<OPR RCCCr   r   c                   `    e Zd Zej        ZefZeeu re	fndZ
ed             Zed             ZdS )r,   r   c                      dS rG   r   r   r   r   rH   zISequence.__reversed__   r5   r   c                      dS r?   r   r   r   r   r@   zISequence.__iter__   r5   r   N)r6   r7   r8   r   Sequencer   extra_classesstrbytes
basestringignored_classesr
   rH   r@   r   r   r   r,   r,      sk        
,CMM (+e||zmmO  X   X  r   r,   c                   "    e Zd Zej        ZefZdS )r)   N)r6   r7   r8   r   MutableSequencer   rT   r   r   r   r)   r)      s        

CKMMMr   r)   c                   X    e Zd ZdZ edde                                feef          Z	dS )IByteStringz/
    This unifies `bytes` and `bytearray`.
    
ByteStringTN)
r6   r7   r8   r   r   r,   rI   rV   	bytearrayr   r   r   r   r\   r\      sI          +lD ''))+i(* *CCCr   r\   c                       e Zd Zej        ZdS )r-   N)r6   r7   r8   r   Setr   r   r   r-   r-      s        
'CCCr   r-   c                       e Zd Zej        ZdS )r*   N)r6   r7   r8   r   
MutableSetr   r   r   r*   r*      s        
.CCCr   r*   c                   (    e Zd Zej        ZefZefZdS )r&   N)	r6   r7   r8   r   MappingdictrT   r   rX   r   r   r   r&   r&      s%        
+CGM
 #nOOOr   r&   c                   *    e Zd Zej        ZeefZefZ	dS )r(   N)
r6   r7   r8   r   MutableMappingre   r   rT   r   rX   r   r   r   r(   r(      s'        

C8%M"nOOOr   r(   c                       e Zd Zej        ZdS )r'   N)r6   r7   r8   r   MappingViewr   r   r   r'   r'      s        
/CCCr   r'   c                       e Zd Zej        ZdS )r"   N)r6   r7   r8   r   	ItemsViewr   r   r   r"   r"      s        
-CCCr   r"   c                       e Zd Zej        ZdS )r%   N)r6   r7   r8   r   KeysViewr   r   r   r%   r%      r<   r   r%   c                   2    e Zd Zej        Zed             ZdS )r/   c                     dS )z
        Optional method. If not provided, the interpreter will use
        ``__iter__`` or the old ``__len__`` and ``__getitem__`` protocol
        to implement ``in``.
        Nr   r2   s    r   r4   zIValuesView.__contains__   r5   r   N)r6   r7   r8   r   
ValuesViewr
   r4   r   r   r   r/   r/      s4        
.C  X  r   r/   c                   &    e Zd Z edd          ZdS )r   	AwaitableTNr6   r7   r8   r   r   r   r   r   r   r              
+k4
(
(CCCr   r   c                   &    e Zd Z edd          ZdS )r   	CoroutineTNrs   r   r   r   r   r      rt   r   r   c                   &    e Zd Z edd          ZdS )r   AsyncIterableTNrs   r   r   r   r   r              
+ot
,
,CCCr   r   c                   &    e Zd Z edd          ZdS )r   AsyncIteratorTNrs   r   r   r   r   r      ry   r   r   c                   &    e Zd Z edd          ZdS )r   AsyncGeneratorTNrs   r   r   r   r   r      s         
+&
-
-CCCr   r   )&r   sysr   r   collectionsr   r   r   r   zope.interface.commonr	   r
   r   __all__r   r!   r#   r$   r+   r    r.   r   r,   r)   r\   r-   r*   r&   r(   r'   r"   r%   r/   r   r   r   r   r   r   r   r   <module>r      s   * 


       # # # # # #                         " " " " " "       . . . . . . * * * * * * #*$&   &  4	 	 	 	 	 	 	 	                  	   	 	 	 	 	) 	 	 	@ @ @ @ @ @ @ @
    \   R R R R R&R R R      0         y      
* * * * *) * * *    ;       $   % % % % %{ % % %% % % % %h % % %
    6       t       d   	 	 	 	 	, 	 	 	) ) ) ) ) ) ) )) ) ) ) ) ) ) )- - - - -\ - - -- - - - -^ - - -. . . . .n . . . . .r   