summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2010-10-31 21:27:50 (GMT)
committerRaymond Hettinger <python@rcn.com>2010-10-31 21:27:50 (GMT)
commit30bf6e836e4d671fd487673134c6041a6fe77204 (patch)
tree3337b76e16ded301d365b583a02be06499ff0c45
parentaf577cbb718c31994df5185ece03e7bdeba2959a (diff)
downloadcpython-30bf6e836e4d671fd487673134c6041a6fe77204.zip
cpython-30bf6e836e4d671fd487673134c6041a6fe77204.tar.gz
cpython-30bf6e836e4d671fd487673134c6041a6fe77204.tar.bz2
Issue 7447: Improve docs for sum().
-rw-r--r--Doc/library/functions.rst9
1 files changed, 6 insertions, 3 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index e97be7b..5c80f94 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -1100,10 +1100,13 @@ are always available. They are listed here in alphabetical order.
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]])