From 190d79e5c648174b550de2bef75d1b4addf0d625 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Wed, 30 Jan 2008 11:58:22 +0000 Subject: Merged revisions 60408-60440 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r60425 | raymond.hettinger | 2008-01-29 20:52:09 +0100 (Tue, 29 Jan 2008) | 1 line CallMethod is faster with a NULL third-argument than with an empty format string. ........ r60431 | raymond.hettinger | 2008-01-30 01:01:07 +0100 (Wed, 30 Jan 2008) | 1 line Add isdisjoint() to the Set/MutableSet ABCs. ........ r60432 | raymond.hettinger | 2008-01-30 01:08:31 +0100 (Wed, 30 Jan 2008) | 1 line MutableSets support a remove() method. ........ r60433 | raymond.hettinger | 2008-01-30 01:51:58 +0100 (Wed, 30 Jan 2008) | 1 line Demonstrate new except/as syntax. ........ r60440 | christian.heimes | 2008-01-30 12:32:37 +0100 (Wed, 30 Jan 2008) | 1 line Patch #1970 by Antoine Pitrou: Speedup unicode whitespace and linebreak detection. The speedup is about 25% for split() (571 / 457 usec) and 35% (175 / 127 usec )for splitlines() ........ --- Doc/tutorial/errors.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Doc/tutorial/errors.rst') diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst index fa2d42220f..5c652a9871 100644 --- a/Doc/tutorial/errors.rst +++ b/Doc/tutorial/errors.rst @@ -131,8 +131,8 @@ the exception (allowing a caller to handle the exception as well):: f = open('myfile.txt') s = f.readline() i = int(s.strip()) - except IOError as e: - print("I/O error(%s): %s" % (e.errno, e.strerror)) + except IOError as (errno, strerror): + print "I/O error(%s): %s" % (errno, strerror) except ValueError: print("Could not convert data to an integer.") except: -- cgit v1.2.1