diff options
author | Raymond Hettinger <python@rcn.com> | 2010-10-31 21:23:24 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2010-10-31 21:23:24 (GMT) |
commit | b373799e0583f368a1736ac9cd02011ba6725bcb (patch) | |
tree | 67e036d6b31162bcfb0d97c38b6ffe7ff895a6d5 /Doc/library | |
parent | 87298c4a237f2735d232f6e50f299c3a4dc686ec (diff) | |
download | cpython-b373799e0583f368a1736ac9cd02011ba6725bcb.zip cpython-b373799e0583f368a1736ac9cd02011ba6725bcb.tar.gz cpython-b373799e0583f368a1736ac9cd02011ba6725bcb.tar.bz2 |
Issue 7447: Improve docs for sum().
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/functions.rst | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index de99bbf..1b85d69 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1115,10 +1115,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]]) |