diff options
author | Georg Brandl <georg@python.org> | 2011-08-08 19:45:13 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2011-08-08 19:45:13 (GMT) |
commit | bdbdfb19783793b97743df15cc3ff4699a601b8e (patch) | |
tree | ac93194290643b67c271e8cd624215cea117622d /Doc/tutorial | |
parent | db79e951958fe901c0c7cf97914dfdb246abc0c3 (diff) | |
download | cpython-bdbdfb19783793b97743df15cc3ff4699a601b8e.zip cpython-bdbdfb19783793b97743df15cc3ff4699a601b8e.tar.gz cpython-bdbdfb19783793b97743df15cc3ff4699a601b8e.tar.bz2 |
Confirm that the prime example is actually correct. We get so many complaints about a "buggy example" on docs@python, let us hope this cuts them in half at least.
Diffstat (limited to 'Doc/tutorial')
-rw-r--r-- | Doc/tutorial/controlflow.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst index e33a596..cb9597f 100644 --- a/Doc/tutorial/controlflow.rst +++ b/Doc/tutorial/controlflow.rst @@ -184,6 +184,9 @@ following loop, which searches for prime numbers:: 8 equals 2 * 4 9 equals 3 * 3 +(Yes, this is the correct code. Look closely: the ``else`` clause belongs to +the :keyword:`for` loop, **not** the :keyword:`if` statement.) + .. _tut-pass: |