[docs] minor error in Tutorial section 4.4

Julia Marshall marshall at bgc-jena.mpg.de
Tue Nov 13 15:23:27 CET 2012


Hello,

this is really a small thing, but there's an inconsistency between the input and
output in the second example (showing the "continue" statement) in section 4.4
of the tutorial.  The example reads as follows:


>>> for num in range(2, 10):
...     if num % 2 == 0:
...         print("Found an even number", num)
...         continue
...     print("Found a number", num)
Found an even number 2
Found a number 3
Found an even number 4
Found a number 5
Found an even number 6
Found a number 7
Found an even number 8
Found a number 9


and it should read like this:


>>> for num in range(2, 10):
...     if num % 2 == 0:
...         print "Found an even number", num
...         continue
...     print "Found a number", num
...
Found an even number 2
Found a number 3
Found an even number 4
Found a number 5
Found an even number 6
Found a number 7
Found an even number 8
Found a number 9


Otherwise there are unsightly parentheses and quotation marks in the output.  I
know this is really nit-picking, but the documentation is really good, so I
figured it might as well be perfect. ;)

Cheers,

-Julia

-------------------------------------------------------
Julia Marshall, Ph.D.
Max-Planck-Institut für Biogeochemie
Hans-Knöll-Str. 10
07745 Jena
Germany

Tel.: +49 (36 41) 57 6383
Fax.: +49 (36 41) 57 7300
mobile.: +49 (176) 6433 2265
email: marshall at bgc-jena.mpg.de
http://www.bgc-jena.mpg.de/~marshall
-------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20121113/f08908e6/attachment.html>


More information about the docs mailing list