summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2011-03-06 10:12:42 (GMT)
committerGeorg Brandl <georg@python.org>2011-03-06 10:12:42 (GMT)
commit891391bf68e66bc441d8c6fc49ab1cf657e394bd (patch)
treefe893ef7d37a765d7463184a9e5249d9c5720b3a /Doc/tutorial
parent13039c87f14aeed325bcb5fadd202922a614957b (diff)
parent1d0a0f50606835198b0e1935a9761f3c95fef350 (diff)
downloadcpython-891391bf68e66bc441d8c6fc49ab1cf657e394bd.zip
cpython-891391bf68e66bc441d8c6fc49ab1cf657e394bd.tar.gz
cpython-891391bf68e66bc441d8c6fc49ab1cf657e394bd.tar.bz2
Merge doc fixes.
Diffstat (limited to 'Doc/tutorial')
-rw-r--r--Doc/tutorial/inputoutput.rst8
1 files changed, 3 insertions, 5 deletions
diff --git a/Doc/tutorial/inputoutput.rst b/Doc/tutorial/inputoutput.rst
index d94bfe0..b35cc80 100644
--- a/Doc/tutorial/inputoutput.rst
+++ b/Doc/tutorial/inputoutput.rst
@@ -19,18 +19,16 @@ the :func:`print` function. (A third way is using the :meth:`write` method
of file objects; the standard output file can be referenced as ``sys.stdout``.
See the Library Reference for more information on this.)
-.. index:: module: string
-
Often you'll want more control over the formatting of your output than simply
printing space-separated values. There are two ways to format your output; the
first way is to do all the string handling yourself; using string slicing and
concatenation operations you can create any layout you can imagine. The
-standard module :mod:`string` contains some useful operations for padding
+string type has some methods that perform useful operations for padding
strings to a given column width; these will be discussed shortly. The second
way is to use the :meth:`str.format` method.
-The :mod:`string` module contains a class Template which offers yet another way
-to substitute values into strings.
+The :mod:`string` module contains a :class:`~string.Template` class which offers
+yet another way to substitute values into strings.
One question remains, of course: how do you convert values to strings? Luckily,
Python has ways to convert any value to a string: pass it to the :func:`repr`