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/plat-mac/applesingle.py b/Lib/plat-mac/applesingle.py
index 76bdb06..fdd163d 100644
--- a/Lib/plat-mac/applesingle.py
+++ b/Lib/plat-mac/applesingle.py
@@ -48,7 +48,7 @@
         header = fileobj.read(AS_HEADER_LENGTH)
         try:
             magic, version, ig, nentry = struct.unpack(AS_HEADER_FORMAT, header)
-        except ValueError, arg:
+        except ValueError as arg:
             raise Error, "Unpack header error: %s" % (arg,)
         if verbose:
             print 'Magic:   0x%8.8x' % (magic,)
@@ -65,7 +65,7 @@
         for hdr in headers:
             try:
                 restype, offset, length = struct.unpack(AS_ENTRY_FORMAT, hdr)
-            except ValueError, arg:
+            except ValueError as arg:
                 raise Error, "Unpack entry error: %s" % (arg,)
             if verbose:
                 print "Fork %d, offset %d, length %d" % (restype, offset, length)