
    Jf8                        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%y)>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 ]  }|j                  |        |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         \/var/www/cs2snipe.com/venv/lib/python3.12/site-packages/zope/interface/common/collections.py_new_in_verr   3   s^     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                   4    e Zd Zej                  Zed        Zy)r   c                      y)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   s    
--C r   r   c                   $    e Zd Zej                  Zy)r!   N)r6   r7   r8   r   Hashabler   r   r   r!   r!   n       
,,Cr   r!   c                   4    e Zd Zej                  Zed        Zy)r#   c                       y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   s    
,,C r   r#   c                   $    e Zd Zej                  Zy)r$   N)r6   r7   r8   r   Iteratorr   r   r   r$   r$   }   r<   r   r$   c                   N    e Zd Z eddej                         f      Zed        Zy)r+   
ReversibleTc                       y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+      s.    
lD9+;+;+=*?
@C r   r+   c                   >    e Zd Z eddej                         f      Zy)r    	GeneratorTN)r6   r7   r8   r   r$   rI   r   r   r   r   r    r       s    
k4)*:*:*<)>
?Cr   r    c                   $    e Zd Zej                  Zy)r.   N)r6   r7   r8   r   Sizedr   r   r   r.   r.      s    
))Cr   r.   c                   z    e Zd Z eddej                         ej                         ej                         f      Zy)r   
CollectionTN)	r6   r7   r8   r   r.   rI   r#   r   r   r   r   r   r   r      s6     	)**,j.?.?.ABCr   r   c                   N    e Zd Zej                  ZefZdZed        Z	ed        Z
y)r,   r   c                       yrG   r   r   r   r   rH   zISequence.__reversed__   r5   r   c                       y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   r   r,   c                   *    e Zd Zej                  ZefZy)r)   N)r6   r7   r8   r   MutableSequencer   rT   r   r   r   r)   r)      s    


CKMr   r)   c                   H    e Zd ZdZ eddej                         feef      Z	y)IByteStringz/
    This unifies `bytes` and `bytearray`.
    
ByteStringTN)
r6   r7   r8   r   r   r,   rI   bytes	bytearrayr   r   r   r   rY   rY      s-     dY--/1E93ECr   rY   c                   $    e Zd Zej                  Zy)r-   N)r6   r7   r8   r   Setr   r   r   r-   r-      s    
''Cr   r-   c                   $    e Zd Zej                  Zy)r*   N)r6   r7   r8   r   
MutableSetr   r   r   r*   r*      s    
..Cr   r*   c                   0    e Zd Zej                  ZefZefZy)r&   N)	r6   r7   r8   r   MappingdictrT   r   rU   r   r   r   r&   r&      s    
++CGM
 #nOr   r&   c                   2    e Zd Zej                  ZeefZefZ	y)r(   N)
r6   r7   r8   r   MutableMappingrc   r   rT   r   rU   r   r   r   r(   r(      s    


C8%M"nOr   r(   c                   $    e Zd Zej                  Zy)r'   N)r6   r7   r8   r   MappingViewr   r   r   r'   r'      s    
//Cr   r'   c                   $    e Zd Zej                  Zy)r"   N)r6   r7   r8   r   	ItemsViewr   r   r   r"   r"      s    
--Cr   r"   c                   $    e Zd Zej                  Zy)r%   N)r6   r7   r8   r   KeysViewr   r   r   r%   r%      r<   r   r%   c                   4    e Zd Zej                  Zed        Zy)r/   c                      y)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/      s    
..C r   r/   c                       e Zd Z edd      Zy)r   	AwaitableTNr6   r7   r8   r   r   r   r   r   r   r          
k4
(Cr   r   c                       e Zd Z edd      Zy)r   	CoroutineTNrq   r   r   r   r   r      rr   r   r   c                       e Zd Z edd      Zy)r   AsyncIterableTNrq   r   r   r   r   r         
ot
,Cr   r   c                       e Zd Z edd      Zy)r   AsyncIteratorTNrq   r   r   r   r   r     rw   r   r   c                       e Zd Z edd      Zy)r   AsyncGeneratorTNrq   r   r   r   r   r   
  s    
&
-Cr   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      sn  *   #     "  . * #*$&(6	 	  	 	) 	@ @
\ &2 y  
) ; $ %{ %%h %6 t d 	, 	) )) )-\ --^ -.n .r   