]> granicus.if.org Git - python/commitdiff
Fix up some examples in the tutorial so we don't contradict our own
authorFred Drake <fdrake@acm.org>
Thu, 20 Dec 2001 23:54:56 +0000 (23:54 +0000)
committerFred Drake <fdrake@acm.org>
Thu, 20 Dec 2001 23:54:56 +0000 (23:54 +0000)
advice on docstrings.
This fixes SF bug #495601.

Doc/tut/tut.tex

index 03dd2672122c192e02dcc8e79ed0b1fa2cc74feb..608388bc3ea066a7bb3080d6a7139f9bef6fb948 100644 (file)
@@ -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: