[Python-checkins] cpython (2.7): Confirm that the prime example is actually correct. We get so many complaints

georg.brandl python-checkins at python.org
Mon Aug 8 21:45:48 CEST 2011


http://hg.python.org/cpython/rev/10f20ad2fbb6
changeset:   71776:10f20ad2fbb6
branch:      2.7
parent:      71771:b2835b8412e5
user:        Georg Brandl <georg at python.org>
date:        Mon Aug 08 21:45:13 2011 +0200
summary:
  Confirm that the prime example is actually correct.  We get so many complaints about a "buggy example" on docs at python, let us hope this cuts them in half at least.

files:
  Doc/tutorial/controlflow.rst |  3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)


diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst
--- a/Doc/tutorial/controlflow.rst
+++ b/Doc/tutorial/controlflow.rst
@@ -156,6 +156,9 @@
    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:
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list