[Python-checkins] cpython (merge 3.2 -> default): Merge ABC and distutils touch-ups from 3.2.
eric.araujo
python-checkins at python.org
Mon Jun 6 17:14:06 CEST 2011
http://hg.python.org/cpython/rev/d035cfbad9f5
changeset: 70670:d035cfbad9f5
parent: 70667:a37368ec4363
parent: 70669:51973a0776f9
user: Éric Araujo <merwok at netwok.org>
date: Sat Jun 04 21:16:42 2011 +0200
summary:
Merge ABC and distutils touch-ups from 3.2.
I have removed the reST target I added in 38cdca2cc253: it is not necessary, as
people can link to the glossary entry or the abc module without it.
Two indentation fixes from 3.2 collections.rst have been ported to 3.3
collections.abc.rst.
files:
Doc/glossary.rst | 16 +++++++------
Doc/library/abc.rst | 2 -
Doc/library/collections.abc.rst | 8 +++---
Doc/library/numbers.rst | 6 ++--
Lib/distutils/tests/Setup.sample | Bin
Lib/distutils/tests/test_extension.py | Bin
6 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/Doc/glossary.rst b/Doc/glossary.rst
--- a/Doc/glossary.rst
+++ b/Doc/glossary.rst
@@ -27,12 +27,14 @@
: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
- 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.
+ :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.abc` module), numbers (in the
+ :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 @@
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
--- a/Doc/library/abc.rst
+++ b/Doc/library/abc.rst
@@ -1,5 +1,3 @@
-.. _abstract-base-classes:
-
:mod:`abc` --- Abstract Base Classes
====================================
diff --git a/Doc/library/collections.abc.rst b/Doc/library/collections.abc.rst
--- a/Doc/library/collections.abc.rst
+++ b/Doc/library/collections.abc.rst
@@ -44,7 +44,7 @@
:class:`Iterable`, ``index``, and ``count``
:class:`Container`
-:class:`MutableSequence` :class:`Sequence` ``__setitem__`` Inherited :class:`Sequence` methods and
+:class:`MutableSequence` :class:`Sequence` ``__setitem__``, Inherited :class:`Sequence` methods and
``__delitem__``, ``append``, ``reverse``, ``extend``, ``pop``,
``insert`` ``remove``, ``clear``, and ``__iadd__``
@@ -175,7 +175,7 @@
.. seealso::
- * `OrderedSet recipe <http://code.activestate.com/recipes/576694/>`_ that uses
- :class:`MutableSet`.
+ * `OrderedSet recipe <http://code.activestate.com/recipes/576694/>`_ for an
+ example built on :class:`MutableSet`.
- * For more about ABCs, see the :mod:`abc` module and :pep:`3119`.
+ * For more about ABCs, see the :mod:`abc` module and :pep:`3119`.
diff --git a/Doc/library/numbers.rst b/Doc/library/numbers.rst
--- 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
old mode 100755
new mode 100644
diff --git a/Lib/distutils/tests/test_extension.py b/Lib/distutils/tests/test_extension.py
old mode 100755
new mode 100644
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list