
    Of8                     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         S/var/www/html/env/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__e         r   N)__name__
__module____qualname__r   	Containerr
   r4   r   r   r   r   r   b   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!   n           
,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__u   r5   r   N)r6   r7   r8   r   Iterabler
   r@   r   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   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__   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         +	)**,,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 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ignored_classesr
   rH   r@   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)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   bytes	bytearrayr   r   r   r   rY   rY      sH          +dY--//1E93E CCCr   rY   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   rU   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   MutableMappingrc   r   rT   r   rU   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   	CoroutineTNrq   r   r   r   r   r      rr   r   r   c                   &    e Zd Z edd          ZdS )r   AsyncIterableTNrq   r   r   r   r   r             
+ot
,
,CCCr   r   c                   &    e Zd Z edd          ZdS )r   AsyncIteratorTNrq   r   r   r   r   r     rw   r   r   c                   &    e Zd Z edd          ZdS )r   AsyncGeneratorTNrq   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)   rY   r-   r*   r&   r(   r'   r"   r%   r/   r   r   r   r   r   r   r   r   <module>r      s   * 


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