summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2010-11-08 02:12:57 (GMT)
committerSenthil Kumaran <orsenthil@gmail.com>2010-11-08 02:12:57 (GMT)
commitbf02429c4307672eb0c1f4a33f5b00c346a917a8 (patch)
tree264ef15ec1faa4795c356079347f6629b9bdd01b
parent683beb6c9b3e1526b11f995af606400ddd195e90 (diff)
downloadcpython-bf02429c4307672eb0c1f4a33f5b00c346a917a8.zip
cpython-bf02429c4307672eb0c1f4a33f5b00c346a917a8.tar.gz
cpython-bf02429c4307672eb0c1f4a33f5b00c346a917a8.tar.bz2
Merged revisions 86310 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86310 | senthil.kumaran | 2010-11-08 09:53:13 +0800 (Mon, 08 Nov 2010) | 3 lines Fix Issue 10303: a small clarification in the tutorial. ........
-rw-r--r--Doc/tutorial/introduction.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/tutorial/introduction.rst b/Doc/tutorial/introduction.rst
index 5af90b3..6d8f890 100644
--- a/Doc/tutorial/introduction.rst
+++ b/Doc/tutorial/introduction.rst
@@ -178,6 +178,13 @@ several ways. They can be enclosed in single quotes or double quotes::
>>> '"Isn\'t," she said.'
'"Isn\'t," she said.'
+The interpreter prints the result of string operations in the same way as they
+are typed for input: inside quotes, and with quotes and other funny characters
+escaped by backslashes, to show the precise value. The string is enclosed in
+double quotes if the string contains a single quote and no double quotes, else
+it's enclosed in single quotes. The :keyword:`print` statement produces a more
+readable output for such input strings.
+
String literals can span multiple lines in several ways. Continuation lines can
be used, with a backslash as the last character on the line indicating that the
next line is a logical continuation of the line::