Index: Doc/library/functions.rst =================================================================== --- Doc/library/functions.rst (Revision 83182) +++ Doc/library/functions.rst (Arbeitskopie) @@ -1082,10 +1082,21 @@ .. 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. + The *start* value must not be a string. + + .. note:: + Using sum to concatenate sequences will result + in quadratic run-time performance. + + Alternatives: + - To concatenate strings, use + ``''.join(str_iterable)`` (see :func:`str.join`). + - To concatenate lists, use + :func:`itertools.chain.from_iterable() + `. + - To add floating point values with extended precision, + use :func:`math.fsum`. .. function:: super([type[, object-or-type]])