diff Doc/tutorial/errors.rst @ 47282:70f9a5db279c legacy-trunk

update the tutorial to use str.format
author Benjamin Peterson <benjamin@python.org>
date Mon, 26 May 2008 00:54:22 +0000
parents 250f29bab61b
children d17cc4d1766c
line wrap: on
line diff
--- a/Doc/tutorial/errors.rst	Sun May 25 20:05:52 2008 +0000
+++ b/Doc/tutorial/errors.rst	Mon May 26 00:54:22 2008 +0000
@@ -132,7 +132,7 @@
        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: