summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-02-03 12:50:04 (GMT)
committerGuido van Rossum <guido@python.org>1995-02-03 12:50:04 (GMT)
commitb6aa92ebf178361e821a1ebffdce6b5fcf96bfae (patch)
tree0fa5a73fbb7e33ac3b5ae6f0677c575d630f1a45 /Lib
parent08e767bdc54eeceda4a20593319afd74c5380200 (diff)
downloadcpython-b6aa92ebf178361e821a1ebffdce6b5fcf96bfae.zip
cpython-b6aa92ebf178361e821a1ebffdce6b5fcf96bfae.tar.gz
cpython-b6aa92ebf178361e821a1ebffdce6b5fcf96bfae.tar.bz2
fix formatting of stack entries
Diffstat (limited to 'Lib')
-rw-r--r--Lib/bdb.py8
-rwxr-xr-xLib/pdb.py5
2 files changed, 8 insertions, 5 deletions
diff --git a/Lib/bdb.py b/Lib/bdb.py
index 7642ed0..0d139d4 100644
--- a/Lib/bdb.py
+++ b/Lib/bdb.py
@@ -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 + '->'
diff --git a/Lib/pdb.py b/Lib/pdb.py
index 30b1477..3796e0d 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -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 '>',