]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
fix formatting of stack entries
authorGuido van Rossum <guido@python.org>
Fri, 3 Feb 1995 12:50:04 +0000 (12:50 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 3 Feb 1995 12:50:04 +0000 (12:50 +0000)
Lib/bdb.py
Lib/pdb.py

index 7642ed0cd97874f1a118bf67025365f0fb131d5a..0d139d45f4379a267a94353ee55577779adb9e8f 100644 (file)
@@ -253,8 +253,12 @@ class Bdb: # Basic Debugger
                    s = s + "<lambda>"
                if frame.f_locals.has_key('__args__'):
                        args = frame.f_locals['__args__']
-                       if args is not None:
-                               s = s + repr.repr(args)
+               else:
+                       args = None
+               if args:
+                       s = s + repr.repr(args)
+               else:
+                       s = s + '()'
                if frame.f_locals.has_key('__return__'):
                        rv = frame.f_locals['__return__']
                        s = s + '->'
index 30b1477536d7a904eb0ffd69a7d1eb3f1ecd6361..3796e0d248ac34cbd214c34432276be0649236a2 100755 (executable)
@@ -62,8 +62,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
        
        def interaction(self, frame, traceback):
                self.setup(frame, traceback)
-               self.print_stack_entry(self.stack[self.curindex],
-                                      line_prefix)
+               self.print_stack_entry(self.stack[self.curindex])
                self.cmdloop()
                self.forget()
 
@@ -288,7 +287,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
                except KeyboardInterrupt:
                        pass
        
-       def print_stack_entry(self, frame_lineno, prompt_prefix=''):
+       def print_stack_entry(self, frame_lineno, prompt_prefix=line_prefix):
                frame, lineno = frame_lineno
                if frame is self.curframe:
                        print '>',