[Python-checkins] r65351 - in python/trunk/Lib: bdb.py pdb.py

brett.cannon python-checkins at python.org
Fri Aug 1 03:36:47 CEST 2008


Author: brett.cannon
Date: Fri Aug  1 03:36:47 2008
New Revision: 65351

Log:
Remove use of tuple unpacking so as to silence SyntaxWarning as triggered by
-3.


Modified:
   python/trunk/Lib/bdb.py
   python/trunk/Lib/pdb.py

Modified: python/trunk/Lib/bdb.py
==============================================================================
--- python/trunk/Lib/bdb.py	(original)
+++ python/trunk/Lib/bdb.py	Fri Aug  1 03:36:47 2008
@@ -131,8 +131,7 @@
         raise NotImplementedError, "subclass of bdb must implement do_clear()"
 
     def break_anywhere(self, frame):
-        return self.breaks.has_key(
-            self.canonic(frame.f_code.co_filename))
+        return self.canonic(frame.f_code.co_filename) in self.breaks
 
     # Derived classes should override the user_* methods
     # to gain control.
@@ -150,7 +149,8 @@
         """This method is called when a return trap is set here."""
         pass
 
-    def user_exception(self, frame, (exc_type, exc_value, exc_traceback)):
+    def user_exception(self, frame, exc_info):
+        exc_type, exc_value, exc_traceback = exc_info
         """This method is called if an exception occurs,
         but only if we are to stop at or just below this level."""
         pass

Modified: python/trunk/Lib/pdb.py
==============================================================================
--- python/trunk/Lib/pdb.py	(original)
+++ python/trunk/Lib/pdb.py	Fri Aug  1 03:36:47 2008
@@ -175,7 +175,8 @@
         print >>self.stdout, '--Return--'
         self.interaction(frame, None)
 
-    def user_exception(self, frame, (exc_type, exc_value, exc_traceback)):
+    def user_exception(self, frame, exc_info):
+        exc_type, exc_value, exc_traceback = exc_info
         """This function is called if an exception occurs,
         but only if we are to stop at or just below this level."""
         frame.f_locals['__exception__'] = exc_type, exc_value


More information about the Python-checkins mailing list