From: Raymond Hettinger Date: Sun, 31 Oct 2010 21:23:24 +0000 (+0000) Subject: Issue 7447: Improve docs for sum(). X-Git-Tag: v3.2a4~206 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b373799e0583f368a1736ac9cd02011ba6725bcb;p=python Issue 7447: Improve docs for sum(). --- diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index de99bbff74..1b85d69cf5 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]])