From bdbdfb19783793b97743df15cc3ff4699a601b8e Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 8 Aug 2011 21:45:13 +0200 Subject: [PATCH] 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. --- Doc/tutorial/controlflow.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst index e33a59619a9..cb9597fb419 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: