]> granicus.if.org Git - python/commitdiff
Merged revisions 86310 via svnmerge from
authorSenthil Kumaran <orsenthil@gmail.com>
Mon, 8 Nov 2010 02:12:57 +0000 (02:12 +0000)
committerSenthil Kumaran <orsenthil@gmail.com>
Mon, 8 Nov 2010 02:12:57 +0000 (02:12 +0000)
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.
........

Doc/tutorial/introduction.rst

index 5af90b35bb4ba2c6e9e47267cb3f524b5656b699..6d8f89008b8a116f78569c31e252b8f9f7381d9c 100644 (file)
@@ -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::