Python 2.6 adds an :mod:`abc` module that lets you define Abstract Base Classes
(ABCs). You can then use :func:`isinstance` and :func:`issubclass` to check
whether an instance or a class implements a particular ABC. The
- :mod:`collections` modules defines a set of useful ABCs such as
-:mod:`collections` module defines a set of useful ABCs such as
++:mod:`collections.abc` module defines a set of useful ABCs such as
:class:`Iterable`, :class:`Container`, and :class:`MutableMapping`.
For Python, many of the advantages of interface specifications can be obtained
mapping
A container object that supports arbitrary key lookups and implements the
-- methods specified in the :class:`~collections.Mapping` or
-- :class:`~collections.MutableMapping`
++ methods specified in the :class:`~collections.abc.Mapping` or
++ :class:`~collections.abc.MutableMapping`
:ref:`abstract base classes <collections-abstract-base-classes>`. Examples
include :class:`dict`, :class:`collections.defaultdict`,
:class:`collections.OrderedDict` and :class:`collections.Counter`.
Here, we create two instances of :class:`WidgetTestCase`, each of which runs a
single test.
- .. versionchanged::
+ .. versionchanged:: 3.2
- `TestCase` can be instantiated successfully without providing a method
- name. This makes it easier to experiment with `TestCase` from the
+ :class:`TestCase` can be instantiated successfully without providing a method
+ name. This makes it easier to experiment with :class:`TestCase` from the
interactive interpreter.
*methodName* defaults to :meth:`runTest`.