summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial/errors.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/errors.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/errors.rst')
-rw-r--r--Doc/tutorial/errors.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst
index 8f14e44..e5fb39d 100644
--- a/Doc/tutorial/errors.rst
+++ b/Doc/tutorial/errors.rst
@@ -132,7 +132,7 @@ the exception (allowing a caller to handle the exception as well)::
s = f.readline()
i = int(s.strip())
except IOError as (errno, strerror):
- print "I/O error(%s): %s" % (errno, strerror)
+ print "I/O error({0}): {1}".format(errno, strerror)
except ValueError:
print "Could not convert data to an integer."
except: