summaryrefslogtreecommitdiffstats
path: root/Doc/tut/tut.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/tut/tut.tex')
-rw-r--r--Doc/tut/tut.tex5
1 files changed, 4 insertions, 1 deletions
diff --git a/Doc/tut/tut.tex b/Doc/tut/tut.tex
index 71d3f60..b227576 100644
--- a/Doc/tut/tut.tex
+++ b/Doc/tut/tut.tex
@@ -1819,6 +1819,9 @@ item, then to the result and the next item, and so on. For example,
0
\end{verbatim}
+Don't use this example's definition of \code{sum}: since summing numbers
+is such a common need, a built-in function \code{sum(\var{sequence})} is
+already provided, and works exactly like this\versionadded{2,3}.
\subsection{List Comprehensions}
@@ -2502,7 +2505,7 @@ standard module \module{__builtin__}\refbimodindex{__builtin__}:
'len', 'license', 'list', 'locals', 'long', 'map', 'max', 'min',
'object', 'oct', 'open', 'ord', 'pow', 'property', 'quit',
'range', 'raw_input', 'reduce', 'reload', 'repr', 'round',
- 'setattr', 'slice', 'staticmethod', 'str', 'string', 'super',
+ 'setattr', 'slice', 'staticmethod', 'str', 'string', 'sum', 'super',
'tuple', 'type', 'unichr', 'unicode', 'vars', 'xrange', 'zip']
\end{verbatim}