o
    ¡U¤g™  ã                   @   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
r¥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 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   úm/var/www/html/Testing_prj/Navya-Bakers/venv/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   

þþ
ÿ	
