summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial
diff options
context:
space:
mode:
authorTerry Reedy <tjreedy@udel.edu>2010-11-12 04:35:16 (GMT)
committerTerry Reedy <tjreedy@udel.edu>2010-11-12 04:35:16 (GMT)
commitb89e4fc4e9d9afc1caf1b1de6bdf5beef33996a4 (patch)
treec2627977f7e81a1f8f392b50bcccfe9b2e598388 /Doc/tutorial
parentf959b7feaa61117305180003c451458a8c572054 (diff)
downloadcpython-b89e4fc4e9d9afc1caf1b1de6bdf5beef33996a4.zip
cpython-b89e4fc4e9d9afc1caf1b1de6bdf5beef33996a4.tar.gz
cpython-b89e4fc4e9d9afc1caf1b1de6bdf5beef33996a4.tar.bz2
Backport rev86422 for issue 10304 from py3k to 31-maint
Diffstat (limited to 'Doc/tutorial')
-rw-r--r--Doc/tutorial/introduction.rst11
1 files changed, 6 insertions, 5 deletions
diff --git a/Doc/tutorial/introduction.rst b/Doc/tutorial/introduction.rst
index 88f7bbe..3e42cee 100644
--- a/Doc/tutorial/introduction.rst
+++ b/Doc/tutorial/introduction.rst
@@ -1,4 +1,4 @@
-.. _tut-informal:
+.. _tut-informal:
**********************************
An Informal Introduction to Python
@@ -220,9 +220,10 @@ the following:
Or, strings can be surrounded in a pair of matching triple-quotes: ``"""`` or
``'''``. End of lines do not need to be escaped when using triple-quotes, but
-they will be included in the string. ::
+they will be included in the string. So the following uses one escape to
+avoid an unwanted initial blank line. ::
- print("""
+ print("""\
Usage: thingy [OPTIONS]
-h Display this usage message
-H hostname Hostname to connect to
@@ -610,7 +611,7 @@ This example introduces several new features.
>>> a, b = 0, 1
>>> while b < 1000:
- ... print(b, end=' ')
+ ... print(b, end=',')
... a, b = b, a+b
...
- 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987
+ 1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,