[Python-checkins] r86066 - python/branches/py3k/Doc/library/functions.rst
raymond.hettinger
python-checkins at python.org
Sun Oct 31 22:23:24 CET 2010
Author: raymond.hettinger
Date: Sun Oct 31 22:23:24 2010
New Revision: 86066
Log:
Issue 7447: Improve docs for sum().
Modified:
python/branches/py3k/Doc/library/functions.rst
Modified: python/branches/py3k/Doc/library/functions.rst
==============================================================================
--- python/branches/py3k/Doc/library/functions.rst (original)
+++ python/branches/py3k/Doc/library/functions.rst Sun Oct 31 22:23:24 2010
@@ -1115,10 +1115,13 @@
Sums *start* and the items of an *iterable* from left to right and returns the
total. *start* defaults to ``0``. The *iterable*'s items are normally numbers,
- and are not allowed to be strings. The fast, correct way to concatenate a
- sequence of strings is by calling ``''.join(sequence)``. To add floating
- point values with extended precision, see :func:`math.fsum`\.
+ and the start value is not allowed to be a string.
+ For some use cases, there a good alternatives to :func:`sum`.
+ The preferred, fast way to concatenate a sequence of strings is by calling
+ ``''.join(sequence)``. To add floating point values with extended precision,
+ see :func:`math.fsum`\. To concatenate a series of iterables, consider using
+ :func:`itertools.chain`.
.. function:: super([type[, object-or-type]])
More information about the Python-checkins
mailing list