
    i                     D   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 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e
r 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/ d0ee          Z  G d1 d2ee          Z! G d3 d4ee          Z" G d5 d6e          Z# G d7 d8e#          Z$ G d9 d:e          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)PY313_OR_OLDER)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         L/usr/local/lib/python3.11/dist-packages/zope/interface/common/collections.py_new_in_verr   4   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__f         r   N)__name__
__module____qualname__r   	Containerr   r5   r   r   r   r   r   c   s4        
-C  X  r   r   c                       e Zd Zej        ZdS )r"   N)r7   r8   r9   r   Hashabler   r   r   r"   r"   o           
,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__v   r6   r   N)r7   r8   r9   r   Iterabler   rA   r   r   r   r$   r$   s   s4        
,C  X  r   r$   c                       e Zd Zej        ZdS )r%   N)r7   r8   r9   r   Iteratorr   r   r   r%   r%   ~   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__   r6   r   N)	r7   r8   r9   r   r$   getABCr   r   rI   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)r7   r8   r9   r   r%   rJ   r   r   r   r   r!   r!      s0        
+k4)*:*:*<*<)>
?
?CCCr   r!   c                       e Zd Zej        ZdS )r/   N)r7   r8   r9   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)	r7   r8   r9   r   r/   rJ   r$   r   r   r   r   r   r   r      sQ         +	)**,,j.?.?.A.AB CCCr   r   c                   R    e Zd Zej        ZefZdZed             Z	ed             Z
dS )r-   r   c                      dS rH   r   r   r   r   rI   zISequence.__reversed__   r6   r   c                      dS r@   r   r   r   r   rA   zISequence.__iter__   r6   r   N)r7   r8   r9   r   Sequencer   extra_classesignored_classesr   rI   rA   r   r   r   r-   r-      s]        
,CMM O  X   X  r   r-   c                   "    e Zd Zej        ZefZdS )r*   N)r7   r8   r9   r   MutableSequencer   rU   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 )IByteStringz7
        This unifies `bytes` and `bytearray`.
        
ByteStringTN)
r7   r8   r9   r   r   r-   rJ   bytes	bytearrayr   r   r   r   rZ   rZ      sH        	 	 k$!1!1!3!3 5y7I
 
r   rZ   c                       e Zd Zej        ZdS )r.   N)r7   r8   r9   r   Setr   r   r   r.   r.      s        
'CCCr   r.   c                       e Zd Zej        ZdS )r+   N)r7   r8   r9   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)	r7   r8   r9   r   MappingdictrU   r   rV   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)
r7   r8   r9   r   MutableMappingrd   r   rU   r   rV   r   r   r   r)   r)      s'        

C8%M"nOOOr   r)   c                       e Zd Zej        ZdS )r(   N)r7   r8   r9   r   MappingViewr   r   r   r(   r(      s        
/CCCr   r(   c                       e Zd Zej        ZdS )r#   N)r7   r8   r9   r   	ItemsViewr   r   r   r#   r#      s        
-CCCr   r#   c                       e Zd Zej        ZdS )r&   N)r7   r8   r9   r   KeysViewr   r   r   r&   r&      r=   r   r&   c                   2    e Zd Zej        Zed             ZdS )r0   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   r3   s    r   r5   zIValuesView.__contains__   r6   r   N)r7   r8   r9   r   
ValuesViewr   r5   r   r   r   r0   r0      s4        
.C  X  r   r0   c                   &    e Zd Z edd          ZdS )r   	AwaitableTNr7   r8   r9   r   r   r   r   r   r   r              
+k4
(
(CCCr   r   c                   &    e Zd Z edd          ZdS )r    	CoroutineTNrr   r   r   r   r    r       rs   r   r    c                   &    e Zd Z edd          ZdS )r   AsyncIterableTNrr   r   r   r   r   r             
+ot
,
,CCCr   r   c                   &    e Zd Z edd          ZdS )r   AsyncIteratorTNrr   r   r   r   r   r     rx   r   r   c                   &    e Zd Z edd          ZdS )r   AsyncGeneratorTNrr   r   r   r   r   r     s         
+&
-
-CCCr   r   )(r   sysr   r   collectionsr   r   r   r   zope.interface._compatr	   zope.interface.commonr
   r   r   __all__r   r"   r$   r%   r,   r!   r/   r   r-   r*   rZ   r.   r+   r'   r)   r(   r#   r&   r0   r   r    r   r   r   r   r   r   <module>r      s   * 


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