Index: Doc/library/functions.rst =================================================================== --- Doc/library/functions.rst (Revision 81300) +++ Doc/library/functions.rst (Arbeitskopie) @@ -1079,10 +1079,18 @@ .. function:: sum(iterable[, start]) 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`\. + total. *start* defaults to ``0``. The *iterable*'s items are normally numbers. + *start* must not be a string. + + .. note:: + Using sum to concatenate sequences will result in quadratic run-time performance. + + Alternatives: + - To concatenate an iterable of iterables, such as a list of lists, use + :func:`itertools.chain.from_iterable` and call the appropriate constructor, + such as :class: `list`, on the result. + - The fast, correct way to concatenate a sequence of strings is by calling + ``''.join(sequence)`` (see :func:`str.join`). + - To add floating point values with extended precision, see :func:`math.fsum`\. .. function:: super([type[, object-or-type]])