Kaydet (Commit) c62cf36e authored tarafından Guido van Rossum's avatar Guido van Rossum

The last two example functions in the section about default argument

values (4.7.1) should return l, not a.  Reported by Axel Boldt.
üst 3fbe67ab
......@@ -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}}
......
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