Index: shelve.rst =================================================================== --- shelve.rst (révision 88640) +++ shelve.rst (copie de travail) @@ -103,7 +103,7 @@ .. class:: Shelf(dict, protocol=None, writeback=False, keyencoding='utf-8') - A subclass of :class:`collections.MutableMapping` which stores pickled values + A subclass of :class:`collections.abc.MutableMapping` which stores pickled values in the *dict* object. By default, version 0 pickles are used to serialize values. The version of the Index: functions.rst =================================================================== --- functions.rst (révision 88640) +++ functions.rst (copie de travail) @@ -1029,7 +1029,7 @@ >>> list(range(1, 0)) [] - Range objects implement the :class:`collections.Sequence` ABC, and provide + Range objects implement the :class:`collections.abc.Sequence` ABC, and provide features such as containment tests, element index lookup, slicing and support for negative indices: Index: stdtypes.rst =================================================================== --- stdtypes.rst (révision 88640) +++ stdtypes.rst (copie de travail) @@ -2276,7 +2276,7 @@ values are hashable, so that ``(key, value)`` pairs are unique and hashable, then the items view is also set-like. (Values views are not treated as set-like since the entries are generally not unique.) For set-like views, all of the -operations defined for the abstract base class :class:`collections.Set` are +operations defined for the abstract base class :class:`collections.abc.Set` are available (for example, ``==``, ``<``, or ``^``). An example of dictionary view usage:: Index: collections.abc.rst =================================================================== --- collections.abc.rst (révision 88640) +++ collections.abc.rst (copie de travail) @@ -8,7 +8,7 @@ .. testsetup:: * - from collections import * + from collections.abc import * import itertools __name__ = '' @@ -77,7 +77,7 @@ particular functionality, for example:: size = None - if isinstance(myvar, collections.Sized): + if isinstance(myvar, collections.abc.Sized): size = len(myvar) Several of the ABCs are also useful as mixins that make it easier to develop @@ -87,7 +87,7 @@ The ABC supplies the remaining methods such as :meth:`__and__` and :meth:`isdisjoint` :: - class ListBasedSet(collections.Set): + class ListBasedSet(collections.abc.Set): ''' Alternate set implementation favoring space over speed and not requiring the set elements to be hashable. ''' def __init__(self, iterable):