Current File : //usr/lib/python3/dist-packages/zope/interface/common/__pycache__/collections.cpython-312.pyc |
�
��e� � � � d Z ddlZddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ dd l m
Z
dd
l mZ efdfd�Zg d
�Z
G d� de
� Z G d� de
� Z G d� de
� Z G d� de� Z G d� de� Z G d� de� Z G d� de
� Z G d� deee� Z G d� dee� 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/ee� Z G d0� d1ee� Z G d2� d3ee� 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)�abc)�OrderedDict)�UserList)�UserDict)�
UserString)�ABCInterface)�optional� c �~ � |rt t | � S t | |dd| 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 �C/usr/lib/python3/dist-packages/zope/interface/common/collections.py�_new_in_verr 3 s^ � � ��s�D�!�!� �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 Zd Zej Zed� � Zy)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__zIContainer.__contains__c � � r N)�__name__�
__module__�__qualname__r � Containerr
r4 r r r r r ` s � �
�-�-�C�
�� �r r c �$ � e Zd Zej Zy)r! N)r6 r7 r8 r �Hashabler r r r! r! k � � �
�,�,�Cr r! c �4 � e Zd Zej Zed� � Zy)r# c � � y�z�
Optional method. If not provided, the interpreter will
implement `iter` using the old ``__getitem__`` protocol.
Nr r r r �__iter__zIIterable.__iter__q r5 r N)r6 r7 r8 r �Iterabler
r@ r r r r# r# n s � �
�,�,�C�
�� �r r# c �$ � e Zd Zej Zy)r$ N)r6 r7 r8 r �Iteratorr r r r$ r$ x r<