edZddlZddlmZddlmZddlmZddlmZddlmZddlmZdd l m Z dd l m Z efd fd Z gd Z Gdde ZGdde ZGdde ZGddeZGddeZGddeZGdde ZGddeeeZGddeeZGd d!eZGd"d#eZGd$d%eZGd&d'eZGd(d)eZGd*d+eZGd,d-eZGd.d/eeZGd0d1eeZGd2d3eeZ Gd4d5e Z!Gd6d7e!Z"Gd8d9e Z#Gd:d;e#Z$Gd<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)optionalc~|rtt|St||dd|zi}|D]}|j||S)N__doc__z4The ABC %s is not defined in this version of Python.)getattrrrregister)nameverbases_if_missingregister_if_missingmissingcs C/usr/lib/python3/dist-packages/zope/interface/common/collections.py _new_in_verr3s^ sD!!d,I  /G ! N)IAsyncGeneratorIAsyncIterableIAsyncIterator IAwaitable ICollection IContainer ICoroutine IGenerator IHashable IItemsView IIterable IIterator IKeysViewIMapping IMappingViewIMutableMappingIMutableSequence IMutableSet IReversible ISequenceISetISized IValuesViewc4eZdZejZedZy)rcy)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__crN)__name__ __module__ __qualname__r Containerr r4r rrrr`s --C   rrc$eZdZejZy)r!N)r6r7r8rHashabler rrr!r!k ,,Crr!c4eZdZejZedZy)r#cyz Optional method. If not provided, the interpreter will implement `iter` using the old ``__getitem__`` protocol. Nr r rr__iter__zIIterable.__iter__qr5rN)r6r7r8rIterabler r@r rrr#r#ns ,,C   rr#c$eZdZejZy)r$N)r6r7r8rIteratorr rrr$r$xr<rr$cNeZdZeddej fZedZy)r+ ReversibleTcyz Optional method. If this isn't present, the interpreter will use ``__len__`` and ``__getitem__`` to implement the `reversed` builtin. Nr r rr __reversed__zIReversible.__reversed__~r5rN) r6r7r8rr#getABCrr rHr rrr+r+{s. lD9+;+;+=*? @C   rr+c>eZdZeddej fZy)r GeneratorTN)r6r7r8rr$rIrr rrr r s k4)*:*:*<)> ?Crr c$eZdZejZy)r.N)r6r7r8rSizedr rrr.r.s ))Crr.czeZdZeddej ej ej fZy)r CollectionTN) r6r7r8rr.rIr#rrr rrrrs5 lD}} (8(8(:Jrsp* # ".*#*$&& 4          )  @@ \ R&R  0 y *)*;$%{%%h% 6t d  ,  ))))-\--^-.n.r