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
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ÚverZbases_if_missingZregister_if_missingÚmissingÚcr   r   úT/var/www/html/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
   r0   r   r   r   r   r   c   ó    r   c                   @   ó   e Zd ZejZdS )r   N)r2   r3   r4   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   r1   zIIterable.__iter__N)r2   r3   r4   r   ÚIterabler
   r;   r   r   r   r   r   s   r6   r   c                   @   r7   )r    N)r2   r3   r4   r   ÚIteratorr   r   r   r   r    ~   r9   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__…   r1   zIReversible.__reversed__N)	r2   r3   r4   r   r   ÚgetABCr   r
   r@   r   r   r   r   r'   ‚   s    r'   c                   @   s   e Zd Zedde ¡ fƒZdS )r   Ú	GeneratorTN)r2   r3   r4   r   r    rA   r   r   r   r   r   r   Ž   s    r   c                   @   r7   )r*   N)r2   r3   r4   r   ÚSizedr   r   r   r   r*   “   r9   r*   c                   @   s*   e Zd Zedde ¡ e ¡ e ¡ fƒZdS )r   Ú
CollectionTN)	r2   r3   r4   r   r*   rA   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-   r?   r   r   r   r   r   r@   ­   r1   zISequence.__reversed__c                   C   r-   r:   r   r   r   r   r   r;   µ   r1   zISequence.__iter__N)r2   r3   r4   r   ÚSequencer   Úextra_classesÚignored_classesr
   r@   r;   r   r   r   r   r(   ¤   s    
r(   c                   @   s   e Zd ZejZefZdS )r%   N)r2   r3   r4   r   ÚMutableSequencer   rF   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)
r2   r3   r4   r   r   r(   rA   ÚbytesÚ	bytearrayr   r   r   r   r   rI   Ã   s
    ÿrI   c                   @   r7   )r)   N)r2   r3   r4   r   ÚSetr   r   r   r   r)   Ì   r9   r)   c                   @   r7   )r&   N)r2   r3   r4   r   Ú
MutableSetr   r   r   r   r&   Ð   r9   r&   c                   @   s   e Zd ZejZefZefZdS )r"   N)	r2   r3   r4   r   ÚMappingÚdictrF   r   rG   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)
r2   r3   r4   r   ÚMutableMappingrP   r   rF   r   rG   r   r   r   r   r$   Þ   s    
r$   c                   @   r7   )r#   N)r2   r3   r4   r   ÚMappingViewr   r   r   r   r#   ä   r9   r#   c                   @   r7   )r   N)r2   r3   r4   r   Ú	ItemsViewr   r   r   r   r   è   r9   r   c                   @   r7   )r!   N)r2   r3   r4   r   ÚKeysViewr   r   r   r   r!   ì   r9   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   r.   r   r   r   r0   ó   r1   zIValuesView.__contains__N)r2   r3   r4   r   Ú
ValuesViewr
   r0   r   r   r   r   r+   ð   r6   r+   c                   @   ó   e Zd ZeddƒZdS )r   Ú	AwaitableTN©r2   r3   r4   r   r   r   r   r   r   r   ü   ó    r   c                   @   rV   )r   Ú	CoroutineTNrX   r   r   r   r   r      rY   r   c                   @   rV   )r   ÚAsyncIterableTNrX   r   r   r   r   r     rY   r   c                   @   rV   )r   ÚAsyncIteratorTNrX   r   r   r   r   r     rY   r   c                   @   rV   )r   ÚAsyncGeneratorTNrX   r   r   r   r   r     rY   r   )(r   Úsysr   r   Úcollectionsr   r   r   r   Zzope.interface._compatr   Zzope.interface.commonr	   r
   r   Ú__all__r   r   r   r    r'   r   r*   r   r(   r%   rI   r)   r&   r"   r$   r#   r   r!   r+   r   r   r   r   r   r   r   r   r   Ú<module>   sZ   

þþ
ÿ	
