summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial/stdlib2.rst
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-05-26 00:54:22 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-05-26 00:54:22 (GMT)
commitf9ef9881d778fc5a5889ac36d77b204eab4d7b4e (patch)
tree112e7bde302cf1b3eb7ff057d201d88e5a67f8b0 /Doc/tutorial/stdlib2.rst
parentc15205e93957b3bef18f317a480f8b99213d4870 (diff)
downloadcpython-f9ef9881d778fc5a5889ac36d77b204eab4d7b4e.zip
cpython-f9ef9881d778fc5a5889ac36d77b204eab4d7b4e.tar.gz
cpython-f9ef9881d778fc5a5889ac36d77b204eab4d7b4e.tar.bz2
update the tutorial to use str.format
Diffstat (limited to 'Doc/tutorial/stdlib2.rst')
-rw-r--r--Doc/tutorial/stdlib2.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/tutorial/stdlib2.rst b/Doc/tutorial/stdlib2.rst
index 459d765..ed4c876 100644
--- a/Doc/tutorial/stdlib2.rst
+++ b/Doc/tutorial/stdlib2.rst
@@ -116,7 +116,7 @@ placeholders such as the current date, image sequence number, or file format::
>>> for i, filename in enumerate(photofiles):
... base, ext = os.path.splitext(filename)
... newname = t.substitute(d=date, n=i, f=ext)
- ... print '%s --> %s' % (filename, newname)
+ ... print '{0} --> {1}'.format(filename, newname)
img_1074.jpg --> Ashley_0.jpg
img_1076.jpg --> Ashley_1.jpg