Improve glossary entry for ABCs.
- Rename reST target name for collections ABCs to avoid collisions
- Link to glossary entry from numbers module doc (other modules already do it)
diff --git a/Doc/library/abc.rst b/Doc/library/abc.rst
index 9f70b02..0408f30 100644
--- a/Doc/library/abc.rst
+++ b/Doc/library/abc.rst
@@ -9,8 +9,8 @@
.. versionadded:: 2.6
-This module provides the infrastructure for defining an :term:`abstract base
-class` (ABCs) in Python, as outlined in :pep:`3119`; see the PEP for why this
+This module provides the infrastructure for defining :term:`abstract base
+classes <abstract base class>` (ABCs) in Python, as outlined in :pep:`3119`; see the PEP for why this
was added to Python. (See also :pep:`3141` and the :mod:`numbers` module
regarding a type hierarchy for numbers based on ABCs.)
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst
index 0f098f7..9f6d079 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -28,7 +28,7 @@
===================== ==================================================================== ===========================
In addition to the concrete container classes, the collections module provides
-:ref:`abstract-base-classes` that can be used to test whether a class provides a
+:ref:`collections-abstract-base-classes` that can be used to test whether a class provides a
particular interface, for example, whether it is hashable or a mapping.
.. seealso::
@@ -851,8 +851,8 @@
original insertion position is changed and moved to the end::
class LastUpdatedOrderedDict(OrderedDict):
-
'Store items in the order the keys were last added'
+
def __setitem__(self, key, value):
if key in self:
del self[key]
@@ -871,10 +871,10 @@
return self.__class__, (OrderedDict(self),)
-.. _abstract-base-classes:
+.. _collections-abstract-base-classes:
-ABCs - abstract base classes
-----------------------------
+Collections Abstract Base Classes
+---------------------------------
The collections module offers the following :term:`ABCs <abstract base class>`:
@@ -888,7 +888,7 @@
:class:`Sized` ``__len__``
:class:`Callable` ``__call__``
-:class:`Sequence` :class:`Sized`, ``__getitem__`` ``__contains__``. ``__iter__``, ``__reversed__``,
+:class:`Sequence` :class:`Sized`, ``__getitem__`` ``__contains__``, ``__iter__``, ``__reversed__``,
:class:`Iterable`, ``index``, and ``count``
:class:`Container`
diff --git a/Doc/library/numbers.rst b/Doc/library/numbers.rst
index a0a825f..f46e8ac 100644
--- a/Doc/library/numbers.rst
+++ b/Doc/library/numbers.rst
@@ -7,9 +7,9 @@
.. versionadded:: 2.6
-The :mod:`numbers` module (:pep:`3141`) defines a hierarchy of numeric abstract
-base classes which progressively define more operations. None of the types
-defined in this module can be instantiated.
+The :mod:`numbers` module (:pep:`3141`) defines a hierarchy of numeric
+:term:`abstract base classes <abstract base class>` which progressively define
+more operations. None of the types defined in this module can be instantiated.
.. class:: Number