diff options
author | Alex Martelli <aleaxit@gmail.com> | 2003-04-22 08:12:33 (GMT) |
---|---|---|
committer | Alex Martelli <aleaxit@gmail.com> | 2003-04-22 08:12:33 (GMT) |
commit | a70b19147fd163744be34745d393af7be603629f (patch) | |
tree | 8ec1a2ae14cfae5fb3a3f14af05a9c9f60b3d739 /Doc/lib/libfuncs.tex | |
parent | 060641d51160f6bf49a049bb677f8412b5a19de3 (diff) | |
download | cpython-a70b19147fd163744be34745d393af7be603629f.zip cpython-a70b19147fd163744be34745d393af7be603629f.tar.gz cpython-a70b19147fd163744be34745d393af7be603629f.tar.bz2 |
Adding new built-in function sum, with docs and tests.
Diffstat (limited to 'Doc/lib/libfuncs.tex')
-rw-r--r-- | Doc/lib/libfuncs.tex | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/lib/libfuncs.tex b/Doc/lib/libfuncs.tex index 323a516..50f22f8 100644 --- a/Doc/lib/libfuncs.tex +++ b/Doc/lib/libfuncs.tex @@ -897,6 +897,14 @@ class C: \versionadded{2.2} \end{funcdesc} +\begin{funcdesc}{sum}{sequence\optional{start=0}} + Sums up the items of a \var{sequence}, from left to right, and returns + the total. The \var{sequence}'s items are normally numbers, and are + not allowed to be strings. The fast, correct way to join up a + sequence of strings is by calling \code{''.join(\var{sequence})}. + \versionadded{2.3} +\end{funcdesc} + \begin{funcdesc}{super}{type\optional{object-or-type}} Return the superclass of \var{type}. If the second argument is omitted the super object returned is unbound. If the second argument is an |