[Python-checkins] r83496 - in python/branches/release26-maint: Doc/Makefile Doc/distutils/apiref.rst Doc/distutils/extending.rst Doc/glossary.rst Doc/library/datetime.rst
georg.brandl
python-checkins at python.org
Mon Aug 2 00:19:17 CEST 2010
Author: georg.brandl
Date: Mon Aug 2 00:19:17 2010
New Revision: 83496
Log:
Merged revisions 82793-82794,82807,82876,83432 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/release27-maint
................
r82793 | georg.brandl | 2010-07-11 10:56:18 +0200 (So, 11 Jul 2010) | 9 lines
Merged revisions 82790 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82790 | georg.brandl | 2010-07-11 10:36:20 +0200 (So, 11 Jul 2010) | 1 line
#3214 followup: add link to ABC entry.
........
................
r82794 | georg.brandl | 2010-07-11 10:57:05 +0200 (So, 11 Jul 2010) | 9 lines
Merged revisions 82789 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82789 | georg.brandl | 2010-07-11 10:33:16 +0200 (So, 11 Jul 2010) | 1 line
Silence makeindex.
........
................
r82807 | georg.brandl | 2010-07-11 12:29:37 +0200 (So, 11 Jul 2010) | 9 lines
Merged revisions 82806 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82806 | georg.brandl | 2010-07-11 12:22:44 +0200 (So, 11 Jul 2010) | 1 line
#9223: link to Command class reference, and move Command interface docs nearer to class docs.
........
................
r82876 | georg.brandl | 2010-07-14 10:55:55 +0200 (Mi, 14 Jul 2010) | 13 lines
Merged revisions 82872,82874 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82872 | georg.brandl | 2010-07-14 10:53:18 +0200 (Mi, 14 Jul 2010) | 1 line
Remove XXX from text.
........
r82874 | georg.brandl | 2010-07-14 10:54:40 +0200 (Mi, 14 Jul 2010) | 1 line
#9235: fix missing import of sys.
........
................
r83432 | georg.brandl | 2010-08-01 21:21:26 +0200 (So, 01 Aug 2010) | 13 lines
Merged revisions 83328,83341 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r83328 | raymond.hettinger | 2010-07-31 12:14:41 +0200 (Sa, 31 Jul 2010) | 1 line
Document how to change OrderedDict update order from first to last.
........
r83341 | georg.brandl | 2010-07-31 13:40:07 +0200 (Sa, 31 Jul 2010) | 1 line
#9430: document timedelta str() and repr().
........
................
Modified:
python/branches/release26-maint/ (props changed)
python/branches/release26-maint/Doc/Makefile
python/branches/release26-maint/Doc/distutils/apiref.rst
python/branches/release26-maint/Doc/distutils/extending.rst
python/branches/release26-maint/Doc/glossary.rst
python/branches/release26-maint/Doc/library/datetime.rst
Modified: python/branches/release26-maint/Doc/Makefile
==============================================================================
--- python/branches/release26-maint/Doc/Makefile (original)
+++ python/branches/release26-maint/Doc/Makefile Mon Aug 2 00:19:17 2010
@@ -143,6 +143,7 @@
# archive the A4 latex
-rm -r build/latex
make latex PAPER=a4
+ -sed -i 's/makeindex/makeindex -q/' build/latex/Makefile
(cd build/latex; make clean && make all-pdf && make FMT=pdf zip bz2)
cp build/latex/docs-pdf.zip dist/python-$(DISTVERSION)-docs-pdf-a4.zip
cp build/latex/docs-pdf.tar.bz2 dist/python-$(DISTVERSION)-docs-pdf-a4.tar.bz2
@@ -150,6 +151,7 @@
# archive the letter latex
rm -r build/latex
make latex PAPER=letter
+ -sed -i 's/makeindex/makeindex -q/' build/latex/Makefile
(cd build/latex; make clean && make all-pdf && make FMT=pdf zip bz2)
cp build/latex/docs-pdf.zip dist/python-$(DISTVERSION)-docs-pdf-letter.zip
cp build/latex/docs-pdf.tar.bz2 dist/python-$(DISTVERSION)-docs-pdf-letter.tar.bz2
Modified: python/branches/release26-maint/Doc/distutils/apiref.rst
==============================================================================
--- python/branches/release26-maint/Doc/distutils/apiref.rst (original)
+++ python/branches/release26-maint/Doc/distutils/apiref.rst Mon Aug 2 00:19:17 2010
@@ -21,7 +21,7 @@
.. function:: setup(arguments)
The basic do-everything function that does most everything you could ever ask
- for from a Distutils method. See XXXXX
+ for from a Distutils method.
The setup function takes a large number of arguments. These are laid out in the
following table.
Modified: python/branches/release26-maint/Doc/distutils/extending.rst
==============================================================================
--- python/branches/release26-maint/Doc/distutils/extending.rst (original)
+++ python/branches/release26-maint/Doc/distutils/extending.rst Mon Aug 2 00:19:17 2010
@@ -15,8 +15,8 @@
should be copied into packages in addition to :file:`.py` files as a
convenience.
-Most distutils command implementations are subclasses of the :class:`Command`
-class from :mod:`distutils.cmd`. New commands may directly inherit from
+Most distutils command implementations are subclasses of the
+:class:`distutils.cmd.Command` class. New commands may directly inherit from
:class:`Command`, while replacements often derive from :class:`Command`
indirectly, directly subclassing the command they are replacing. Commands are
required to derive from :class:`Command`.
Modified: python/branches/release26-maint/Doc/glossary.rst
==============================================================================
--- python/branches/release26-maint/Doc/glossary.rst (original)
+++ python/branches/release26-maint/Doc/glossary.rst Mon Aug 2 00:19:17 2010
@@ -160,9 +160,9 @@
must be a duck.") By emphasizing interfaces rather than specific types,
well-designed code improves its flexibility by allowing polymorphic
substitution. Duck-typing avoids tests using :func:`type` or
- :func:`isinstance`. (Note, however, that duck-typing can be complemented
- with abstract base classes.) Instead, it typically employs :func:`hasattr`
- tests or :term:`EAFP` programming.
+ :func:`isinstance`. (Note, however, that duck-typing can be complemented
+ with :term:`abstract base class`\ es.) Instead, it typically employs
+ :func:`hasattr` tests or :term:`EAFP` programming.
EAFP
Easier to ask for forgiveness than permission. This common Python coding
Modified: python/branches/release26-maint/Doc/library/datetime.rst
==============================================================================
--- python/branches/release26-maint/Doc/library/datetime.rst (original)
+++ python/branches/release26-maint/Doc/library/datetime.rst Mon Aug 2 00:19:17 2010
@@ -235,6 +235,14 @@
| ``abs(t)`` | equivalent to +\ *t* when ``t.days >= 0``, and|
| | to -*t* when ``t.days < 0``. (2) |
+--------------------------------+-----------------------------------------------+
+| ``str(t)`` | Returns a string in the form |
+| | ``[D day[s], ][H]H:MM:SS[.UUUUUU]``, where D |
+| | is negative for negative ``t``. (5) |
++--------------------------------+-----------------------------------------------+
+| ``repr(t)`` | Returns a string in the form |
+| | ``datetime.timedelta(D[, S[, U]])``, where D |
+| | is negative for negative ``t``. (5) |
++--------------------------------+-----------------------------------------------+
Notes:
@@ -250,6 +258,16 @@
(4)
-*timedelta.max* is not representable as a :class:`timedelta` object.
+(5)
+ String representations of :class:`timedelta` objects are normalized
+ similarly to their internal representation. This leads to somewhat
+ unusual results for negative timedeltas. For example:
+
+ >>> timedelta(hours=-5)
+ datetime.timedelta(-1, 68400)
+ >>> print(_)
+ -1 day, 19:00:00
+
In addition to the operations listed above :class:`timedelta` objects support
certain additions and subtractions with :class:`date` and :class:`datetime`
objects (see below).
More information about the Python-checkins
mailing list