summaryrefslogtreecommitdiffstats
path: root/Doc/glossary.rst
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-06-04 16:42:38 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-06-04 16:42:38 (GMT)
commitfa088dbd0cf20abdab011285d7f5d950ca61fb4a (patch)
treef2dd07712165120283fc9c647e4ef19d4a4890d4 /Doc/glossary.rst
parent07e58c33896c382ebccd99ed8dc28e457ab96c45 (diff)
downloadcpython-fa088dbd0cf20abdab011285d7f5d950ca61fb4a.zip
cpython-fa088dbd0cf20abdab011285d7f5d950ca61fb4a.tar.gz
cpython-fa088dbd0cf20abdab011285d7f5d950ca61fb4a.tar.bz2
Improve glossary entry for ABCs.
- Rename reST target name for collections ABCs to avoid collisions - Add link to importlib ABCs (collections, numbers and io ABCs were already linked) - Link to glossary entry from numbers module doc (other modules already do it)
Diffstat (limited to 'Doc/glossary.rst')
-rw-r--r--Doc/glossary.rst14
1 files changed, 8 insertions, 6 deletions
diff --git a/Doc/glossary.rst b/Doc/glossary.rst
index d14455b..fa34f29 100644
--- a/Doc/glossary.rst
+++ b/Doc/glossary.rst
@@ -27,12 +27,14 @@ Glossary
:ref:`2to3-reference`.
abstract base class
- :ref:`abstract-base-classes` complement :term:`duck-typing` by
+ Abstract base classes complement :term:`duck-typing` by
providing a way to define interfaces when other techniques like
- :func:`hasattr` would be clumsy. Python comes with many built-in ABCs for
+ :func:`hasattr` would be clumsy or subtly wrong (for example with
+ :ref:`magic methods <special-lookup>`). Python comes with many built-in ABCs for
data structures (in the :mod:`collections` module), numbers (in the
- :mod:`numbers` module), and streams (in the :mod:`io` module). You can
- create your own ABC with the :mod:`abc` module.
+ :mod:`numbers` module), streams (in the :mod:`io` module), import finders
+ and loaders (in the :mod:`importlib.abc` module). You can create your own
+ ABCs with the :mod:`abc` module.
argument
A value passed to a function or method, assigned to a named local
@@ -430,8 +432,8 @@ Glossary
mapping
A container object that supports arbitrary key lookups and implements the
methods specified in the :class:`Mapping` or :class:`MutableMapping`
- :ref:`abstract base classes <abstract-base-classes>`. Examples include
- :class:`dict`, :class:`collections.defaultdict`,
+ :ref:`abstract base classes <collections-abstract-base-classes>`. Examples
+ include :class:`dict`, :class:`collections.defaultdict`,
:class:`collections.OrderedDict` and :class:`collections.Counter`.
metaclass