o
    >h                     @   s$  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dZg dZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deeeZG d d! d!eeZG d"d# d#eZe
rG d$d% d%eZG d&d' d'eZG d(d) d)eZG d*d+ d+eZG d,d- d-eZG d.d/ d/eZG d0d1 d1eeZ G d2d3 d3eeZ!G d4d5 d5eeZ"G d6d7 d7eZ#G d8d9 d9e#Z$G d:d; d;eZ%G d<d= d=e%Z&G d>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                 C   s:   |rt t| S t| |dd|  i}|D ]}|| q|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cr   r   /var/www/vedio/testing/chatpythonscript.ninositsolution.com/env/lib/python3.10/site-packages/zope/interface/common/collections.py_new_in_ver4   s   
r   )IAsyncGeneratorIAsyncIterableIAsyncIterator
IAwaitableICollection
IContainer
ICoroutine
IGenerator	IHashable
IItemsView	IIterable	IIterator	IKeysViewIMappingIMappingViewIMutableMappingIMutableSequenceIMutableSetIReversible	ISequenceISetISizedIValuesViewc                   @      e Zd ZejZedd ZdS )r   c                 C      dS )z
        Optional method. If not provided, the interpreter will use
        ``__iter__`` or the old ``__getitem__`` protocol
        to implement ``in``.
        Nr   otherr   r   r   __contains__f       zIContainer.__contains__N)__name__
__module____qualname__r   	Containerr
   r2   r   r   r   r   r   c       r   c                   @      e Zd ZejZdS )r   N)r4   r5   r6   r   Hashabler   r   r   r   r   o       
r   c                   @   r.   )r!   c                   C   r/   z
        Optional method. If not provided, the interpreter will
        implement `iter` using the old ``__getitem__`` protocol.
        Nr   r   r   r   r   __iter__v   r3   zIIterable.__iter__N)r4   r5   r6   r   Iterabler
   r=   r   r   r   r   r!   s   r8   r!   c                   @   r9   )r"   N)r4   r5   r6   r   Iteratorr   r   r   r   r"   ~   r;   r"   c                   @   s*   e Zd Zedde fZedd ZdS )r)   
ReversibleTc                   C   r/   z
        Optional method. If this isn't present, the interpreter
        will use ``__len__`` and ``__getitem__`` to implement the
        `reversed` builtin.
        Nr   r   r   r   r   __reversed__   r3   zIReversible.__reversed__N)	r4   r5   r6   r   r!   getABCr   r
   rB   r   r   r   r   r)      s    r)   c                   @   s   e Zd Zedde fZdS )r   	GeneratorTN)r4   r5   r6   r   r"   rC   r   r   r   r   r   r      s    r   c                   @   r9   )r,   N)r4   r5   r6   r   Sizedr   r   r   r   r,      r;   r,   c                   @   s*   e Zd Zedde e e fZdS )r   
CollectionTN)	r4   r5   r6   r   r,   rC   r!   r   r   r   r   r   r   r      s    r   c                   @   s4   e Zd ZejZefZdZedd Z	edd Z
dS )r*   r   c                   C   r/   rA   r   r   r   r   r   rB      r3   zISequence.__reversed__c                   C   r/   r<   r   r   r   r   r   r=      r3   zISequence.__iter__N)r4   r5   r6   r   Sequencer   extra_classesignored_classesr
   rB   r=   r   r   r   r   r*      s    
r*   c                   @   s   e Zd ZejZefZdS )r'   N)r4   r5   r6   r   MutableSequencer   rH   r   r   r   r   r'      s    
r'   c                   @   s(   e Zd ZdZedde feefZ	dS )IByteStringz7
        This unifies `bytes` and `bytearray`.
        
ByteStringTN)
r4   r5   r6   r   r   r*   rC   bytes	bytearrayr   r   r   r   r   rK      s
    rK   c                   @   r9   )r+   N)r4   r5   r6   r   Setr   r   r   r   r+      r;   r+   c                   @   r9   )r(   N)r4   r5   r6   r   
MutableSetr   r   r   r   r(      r;   r(   c                   @   s   e Zd ZejZefZefZdS )r$   N)	r4   r5   r6   r   MappingdictrH   r   rI   r   r   r   r   r$      s    
r$   c                   @   s    e Zd ZejZeefZefZ	dS )r&   N)
r4   r5   r6   r   MutableMappingrR   r   rH   r   rI   r   r   r   r   r&      s    
r&   c                   @   r9   )r%   N)r4   r5   r6   r   MappingViewr   r   r   r   r%      r;   r%   c                   @   r9   )r    N)r4   r5   r6   r   	ItemsViewr   r   r   r   r       r;   r    c                   @   r9   )r#   N)r4   r5   r6   r   KeysViewr   r   r   r   r#      r;   r#   c                   @   r.   )r-   c                 C   r/   )z
        Optional method. If not provided, the interpreter will use
        ``__iter__`` or the old ``__len__`` and ``__getitem__`` protocol
        to implement ``in``.
        Nr   r0   r   r   r   r2      r3   zIValuesView.__contains__N)r4   r5   r6   r   
ValuesViewr
   r2   r   r   r   r   r-      r8   r-   c                   @      e Zd ZeddZdS )r   	AwaitableTNr4   r5   r6   r   r   r   r   r   r   r          r   c                   @   rX   )r   	CoroutineTNrZ   r   r   r   r   r      r[   r   c                   @   rX   )r   AsyncIterableTNrZ   r   r   r   r   r     r[   r   c                   @   rX   )r   AsyncIteratorTNrZ   r   r   r   r   r     r[   r   c                   @   rX   )r   AsyncGeneratorTNrZ   r   r   r   r   r     r[   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'   rK   r+   r(   r$   r&   r%   r    r#   r-   r   r   r   r   r   r   r   r   r   <module>   sZ   


	
