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 | a350f0f9fd40708ca863b01aa09402f362d5ea44 (patch) | |
tree | fe394b6c9fb40f32789906eda3880a6afb13cb39 /Doc/tutorial | |
parent | a9c9b2c38c8ed895ef38d92c79af77f2cfa398dc (diff) | |
download | cpython-a350f0f9fd40708ca863b01aa09402f362d5ea44.zip cpython-a350f0f9fd40708ca863b01aa09402f362d5ea44.tar.gz cpython-a350f0f9fd40708ca863b01aa09402f362d5ea44.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 5c7ca4e..43a8382 100644 --- a/Doc/tutorial/controlflow.rst +++ b/Doc/tutorial/controlflow.rst @@ -156,6 +156,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: |