Commit 30bf6e83 authored by Raymond Hettinger's avatar Raymond Hettinger

Issue 7447: Improve docs for sum().

parent af577cbb
...@@ -1100,10 +1100,13 @@ are always available. They are listed here in alphabetical order. ...@@ -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 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, 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 and the start value is not allowed to be a string.
sequence of strings is by calling ``''.join(sequence)``. To add floating
point values with extended precision, see :func:`math.fsum`\.
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]]) .. function:: super([type[, object-or-type]])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment