diff options
author | Éric Araujo <merwok@netwok.org> | 2011-06-06 15:11:47 (GMT) |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2011-06-06 15:11:47 (GMT) |
commit | 5b52f957977f450613c6eafdc9216ae7993d4d49 (patch) | |
tree | a896ba8c93fa879e7c9866d81b9674983c4d09bb | |
parent | b8c60130f1fc745f35dffc2be622e84164e6d0a5 (diff) | |
parent | 70798be6f65029f5a37b34db83512460aa88813c (diff) | |
download | cpython-5b52f957977f450613c6eafdc9216ae7993d4d49.zip cpython-5b52f957977f450613c6eafdc9216ae7993d4d49.tar.gz cpython-5b52f957977f450613c6eafdc9216ae7993d4d49.tar.bz2 |
Branch merge
-rw-r--r-- | Doc/glossary.rst | 14 | ||||
-rw-r--r-- | Doc/library/abc.rst | 2 | ||||
-rw-r--r-- | Doc/library/collections.rst | 10 | ||||
-rw-r--r-- | Doc/library/numbers.rst | 6 | ||||
-rw-r--r--[-rwxr-xr-x] | Lib/distutils/tests/Setup.sample | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | Lib/distutils/tests/test_extension.py | 0 |
6 files changed, 16 insertions, 16 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 diff --git a/Doc/library/abc.rst b/Doc/library/abc.rst index 9fadbd2..fa34a6f 100644 --- a/Doc/library/abc.rst +++ b/Doc/library/abc.rst @@ -12,7 +12,7 @@ -------------- 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 +class` (ABC) 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 79db55e..0b45fe1 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -33,8 +33,9 @@ Python's general purpose built-in containers, :class:`dict`, :class:`list`, ===================== ==================================================================== 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 -particular interface, for example, whether it is hashable or a mapping. +:ref:`abstract base classes <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. :class:`Counter` objects @@ -984,7 +985,7 @@ attribute. subclass) or an arbitrary sequence which can be converted into a string using the built-in :func:`str` function. -.. _abstract-base-classes: +.. _collections-abstract-base-classes: ABCs - abstract base classes ---------------------------- @@ -1136,9 +1137,6 @@ Notes on using :class:`Set` and :class:`MutableSet` as a mixin: .. seealso:: - * Latest version of the :source:`Python source code for the collections - abstract base classes <Lib/_abcoll.py>` - * `OrderedSet recipe <http://code.activestate.com/recipes/576694/>`_ for an example built on :class:`MutableSet`. diff --git a/Doc/library/numbers.rst b/Doc/library/numbers.rst index df8d521..ad33396 100644 --- a/Doc/library/numbers.rst +++ b/Doc/library/numbers.rst @@ -5,9 +5,9 @@ :synopsis: Numeric abstract base classes (Complex, Real, Integral, etc.). -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 diff --git a/Lib/distutils/tests/Setup.sample b/Lib/distutils/tests/Setup.sample index 36c4290..36c4290 100755..100644 --- a/Lib/distutils/tests/Setup.sample +++ b/Lib/distutils/tests/Setup.sample diff --git a/Lib/distutils/tests/test_extension.py b/Lib/distutils/tests/test_extension.py index e35f273..e35f273 100755..100644 --- a/Lib/distutils/tests/test_extension.py +++ b/Lib/distutils/tests/test_extension.py |