SF patch 1631942 by Collin Winter:
(a) "except E, V" -> "except E as V"
(b) V is now limited to a simple name (local variable)
(c) V is now deleted at the end of the except block
diff --git a/Lib/sqlite3/test/hooks.py b/Lib/sqlite3/test/hooks.py
index 761bdaa..d67028f 100644
--- a/Lib/sqlite3/test/hooks.py
+++ b/Lib/sqlite3/test/hooks.py
@@ -36,7 +36,7 @@
         try:
             con.create_collation("X", 42)
             self.fail("should have raised a TypeError")
-        except TypeError, e:
+        except TypeError as e:
             self.failUnlessEqual(e.args[0], "parameter must be callable")
 
     def CheckCreateCollationNotAscii(self):
@@ -44,7 +44,7 @@
         try:
             con.create_collation("collä", cmp)
             self.fail("should have raised a ProgrammingError")
-        except sqlite.ProgrammingError, e:
+        except sqlite.ProgrammingError as e:
             pass
 
     def CheckCollationIsUsed(self):
@@ -73,7 +73,7 @@
         try:
             result = con.execute(sql).fetchall()
             self.fail("should have raised an OperationalError")
-        except sqlite.OperationalError, e:
+        except sqlite.OperationalError as e:
             self.failUnlessEqual(e.args[0].lower(), "no such collation sequence: mycoll")
 
     def CheckCollationRegisterTwice(self):
@@ -101,7 +101,7 @@
         try:
             con.execute("select 'a' as x union select 'b' as x order by x collate mycoll")
             self.fail("should have raised an OperationalError")
-        except sqlite.OperationalError, e:
+        except sqlite.OperationalError as e:
             if not e.args[0].startswith("no such collation sequence"):
                 self.fail("wrong OperationalError raised")