diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-05-26 00:54:22 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-05-26 00:54:22 (GMT) |
commit | f9ef9881d778fc5a5889ac36d77b204eab4d7b4e (patch) | |
tree | 112e7bde302cf1b3eb7ff057d201d88e5a67f8b0 /Doc/tutorial/errors.rst | |
parent | c15205e93957b3bef18f317a480f8b99213d4870 (diff) | |
download | cpython-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.rst | 2 |
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: |