From: Guido van Rossum Date: Sat, 24 Oct 1998 13:15:28 +0000 (+0000) Subject: The last two example functions in the section about default argument X-Git-Tag: v1.5.2b1~268 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c62cf36e7630c73a5bc2309430b836cd616bb718;p=thirdparty%2FPython%2Fcpython.git The last two example functions in the section about default argument values (4.7.1) should return l, not a. Reported by Axel Boldt. --- diff --git a/Doc/tut/tut.tex b/Doc/tut/tut.tex index e16fc46546f0..f9754365a02d 100644 --- a/Doc/tut/tut.tex +++ b/Doc/tut/tut.tex @@ -1171,7 +1171,7 @@ the arguments passed to it on subsequent calls: \begin{verbatim} def f(a, l = []): l.append(a) - return a + return l print f(1) print f(2) print f(3) @@ -1193,7 +1193,7 @@ def f(a, l = None): if l is None: l = [] l.append(a) - return a + return l \end{verbatim} \subsection{Keyword Arguments \label{keywordArgs}}