[Python-checkins] cpython (2.7): Use 2.x "print" syntax for this example.

georg.brandl python-checkins at python.org
Mon Nov 12 19:26:05 CET 2012


http://hg.python.org/cpython/rev/121872879e91
changeset:   80405:121872879e91
branch:      2.7
parent:      80400:13b74c0b040c
user:        Georg Brandl <georg at python.org>
date:        Mon Nov 12 19:25:55 2012 +0100
summary:
  Use 2.x "print" syntax for this example.

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


diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst
--- a/Doc/tutorial/controlflow.rst
+++ b/Doc/tutorial/controlflow.rst
@@ -168,9 +168,9 @@
 
     >>> for num in range(2, 10):
     ...     if num % 2 == 0:
-    ...         print("Found an even number", num)
+    ...         print "Found an even number", num
     ...         continue
-    ...     print("Found a number", num)
+    ...     print "Found a number", num
     Found an even number 2
     Found a number 3
     Found an even number 4
@@ -180,6 +180,7 @@
     Found an even number 8
     Found a number 9
 
+
 .. _tut-pass:
 
 :keyword:`pass` Statements

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


More information about the Python-checkins mailing list