B
    `                 @   s  d Z ddlmZ ddlZddlmZ yddlmZ W n ek
rP   ddlZY nX ddlmZ y(ddlm	Z	 ddlm
Z
 dd	lmZ W n8 ek
r   ddl	m	Z	 dd
l
mZ
 dd	lmZ Y nX ddlmZ ddlmZ ddlmZ ddlmZ ejdd dkZejdd dkZefdfddZdddddddddddd d!d"d#d$d%d&d'd(d)d*d+g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 d0d' d'eZG d1d deZG d2d* d*eZ G d3d de eeZ!G d4d( d(ee!Z"G d5d% d%e"Z#G d6d7 d7e"Z$G d8d) d)e!Z%G d9d& 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%Z*G d>d! d!e)e%Z+G d?d+ d+e)e!Z,G d@d deZ-G dAd de-Z.G dBd deZ/G dCd de/Z0G dDd de0Z1dS )Ea  
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
    )absolute_importN)ABCMeta)abc)OrderedDict)UserList)UserDict)
UserString)IterableUserDict)PYTHON2)PYTHON3)ABCInterface)optional   )      )r       c             C   s>   |rt t| S t| |dd|  i}x|D ]}|| q(W |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   i/home/kop/projects/devel/pgwui/test_venv/lib/python3.7/site-packages/zope/interface/common/collections.py_new_in_verJ   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               @   s   e Zd ZejZedd ZdS )r!   c             C   s   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__z   s    zIContainer.__contains__N)__name__
__module____qualname__r   	Containerr   r4   r   r   r   r   r!   w   s   c               @   s   e Zd ZejZdS )r$   N)r5   r6   r7   r   Hashabler   r   r   r   r$      s   c               @   s   e Zd ZejZedd ZdS )r&   c               C   s   dS )z
        Optional method. If not provided, the interpreter will
        implement `iter` using the old ``__getitem__`` protocol.
        Nr   r   r   r   r   __iter__   s    zIIterable.__iter__N)r5   r6   r7   r   Iterabler   r:   r   r   r   r   r&      s   c               @   s   e Zd ZejZdS )r'   N)r5   r6   r7   r   Iteratorr   r   r   r   r'      s   c               @   s*   e Zd Zedee fZedd Z	dS )r.   
Reversiblec               C   s   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   r   __reversed__   s    zIReversible.__reversed__N)
r5   r6   r7   r   PY36r&   getABCr   r   r>   r   r   r   r   r.      s   c               @   s   e Zd Zedee fZdS )r#   	GeneratorN)r5   r6   r7   r   PY35r'   r@   r   r   r   r   r   r#      s   c               @   s   e Zd ZejZdS )r1   N)r5   r6   r7   r   Sizedr   r   r   r   r1      s   c               @   s*   e Zd Zedee e e fZ	dS )r    
CollectionN)
r5   r6   r7   r   r?   r1   r@   r&   r!   r   r   r   r   r   r       s   c               @   sB   e Zd ZejZefZeekr"e	fndZ
edd Zedd ZdS )r/   r   c               C   s   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   r   r>      s    zISequence.__reversed__c               C   s   dS )z
        Optional method. If not provided, the interpreter will
        implement `iter` using the old ``__getitem__`` protocol.
        Nr   r   r   r   r   r:      s    zISequence.__iter__N)r5   r6   r7   r   Sequencer   extra_classesstrbytes
basestringignored_classesr   r>   r:   r   r   r   r   r/      s
   c               @   s   e Zd ZejZefZdS )r,   N)r5   r6   r7   r   MutableSequencer   rF   r   r   r   r   r,      s   c               @   s(   e Zd ZdZedee fee	fZ
dS )IByteStringz/
    This unifies `bytes` and `bytearray`.
    
ByteStringN)r5   r6   r7   r   r   PY3r/   r@   rH   	bytearrayr   r   r   r   r   rL      s   rL   c               @   s   e Zd ZejZdS )r0   N)r5   r6   r7   r   Setr   r   r   r   r0      s   c               @   s   e Zd ZejZdS )r-   N)r5   r6   r7   r   
MutableSetr   r   r   r   r-      s   c               @   s2   e Zd ZejZefZefZe	r.e
dd ZeZdS )r)   c             C   s   dS )z:
            The interpreter will supply one.
            Nr   )r3   r   r   r   __eq__   s    zIMapping.__eq__N)r5   r6   r7   r   MappingdictrF   r   rJ   PY2r   rR   __ne__r   r   r   r   r)      s   c               @   s    e Zd ZejZeefZefZ	dS )r+   N)
r5   r6   r7   r   MutableMappingrT   r   rF   r   rJ   r   r   r   r   r+      s   c               @   s   e Zd ZejZdS )r*   N)r5   r6   r7   r   MappingViewr   r   r   r   r*      s   c               @   s   e Zd ZejZdS )r%   N)r5   r6   r7   r   	ItemsViewr   r   r   r   r%      s   c               @   s   e Zd ZejZdS )r(   N)r5   r6   r7   r   KeysViewr   r   r   r   r(      s   c               @   s   e Zd ZejZedd ZdS )r2   c             C   s   dS )z
        Optional method. If not provided, the interpreter will use
        ``__iter__`` or the old ``__len__`` and ``__getitem__`` protocol
        to implement ``in``.
        Nr   )r3   r   r   r   r4     s    zIValuesView.__contains__N)r5   r6   r7   r   
ValuesViewr   r4   r   r   r   r   r2      s   c               @   s   e Zd ZedeZdS )r   	AwaitableN)r5   r6   r7   r   rB   r   r   r   r   r   r     s   c               @   s   e Zd ZedeZdS )r"   	CoroutineN)r5   r6   r7   r   rB   r   r   r   r   r   r"     s   c               @   s   e Zd ZedeZdS )r   AsyncIterableN)r5   r6   r7   r   rB   r   r   r   r   r   r     s   c               @   s   e Zd ZedeZdS )r   AsyncIteratorN)r5   r6   r7   r   rB   r   r   r   r   r   r     s   c               @   s   e Zd ZedeZdS )r   AsyncGeneratorN)r5   r6   r7   r   r?   r   r   r   r   r   r     s   )2r   
__future__r   sysr   r   collectionsImportErrorr   r   r   r   r	   Zzope.interface._compatr
   rU   r   rN   Zzope.interface.commonr   r   version_inforB   r?   r   __all__r!   r$   r&   r'   r.   r#   r1   r    r/   r,   rL   r0   r-   r)   r+   r*   r%   r(   r2   r   r"   r   r   r   r   r   r   r   <module>   s   
	