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/pdb.py b/Lib/pdb.py
index 88303d0..afe69d2 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -330,7 +330,7 @@
arg = arg[colon+1:].lstrip()
try:
lineno = int(arg)
- except ValueError, msg:
+ except ValueError as msg:
print >>self.stdout, '*** Bad lineno:', arg
return
else:
@@ -618,7 +618,7 @@
self.curframe.f_lineno = arg
self.stack[self.curindex] = self.stack[self.curindex][0], arg
self.print_stack_entry(self.stack[self.curindex])
- except ValueError, e:
+ except ValueError as e:
print >>self.stdout, '*** Jump failed:', e
do_j = do_jump