[Python-checkins] cpython (3.2): 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:47 CEST 2011


http://hg.python.org/cpython/rev/0e5433cfe404
changeset: 71774:0e5433cfe404
branch: 3.2
parent: 71772:41b816853819
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
@@ -184,6 +184,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

AltStyle によって変換されたページ (->オリジナル) /