Commit 23d45f47 authored by Fred Drake's avatar Fred Drake

Fix up some examples in the tutorial so we don't contradict our own

advice on docstrings.
This fixes SF bug #495601.
parent 6bc62c49
......@@ -1228,7 +1228,7 @@ arbitrary boundary:
\begin{verbatim}
>>> def fib(n): # write Fibonacci series up to n
... "Print a Fibonacci series up to n"
... """Print a Fibonacci series up to n."""
... a, b = 0, 1
... while b < n:
... print b,
......@@ -1306,7 +1306,7 @@ the Fibonacci series, instead of printing it:
\begin{verbatim}
>>> def fib2(n): # return Fibonacci series up to n
... "Return a list containing the Fibonacci series up to n"
... """Return a list containing the Fibonacci series up to n."""
... result = []
... a, b = 0, 1
... while b < n:
......
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