diff options
author | Guido van Rossum <guido@python.org> | 1992-11-05 10:43:02 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1992-11-05 10:43:02 (GMT) |
commit | c629d34c4f1797b690a6c93ea3e2a5b82698b686 (patch) | |
tree | 812dcbc9fd664f9a5354e3301d7aa2375d85517a /Lib/pdb.py | |
parent | 1115ab2a7469746859655cfa7f717c794a8a22ab (diff) | |
download | cpython-c629d34c4f1797b690a6c93ea3e2a5b82698b686.zip cpython-c629d34c4f1797b690a6c93ea3e2a5b82698b686.tar.gz cpython-c629d34c4f1797b690a6c93ea3e2a5b82698b686.tar.bz2 |
* change default line numbers for 'list' in pdb.py
* changed eval() into getattr() in cmd.py
* added dirname(), basename() and (dummy) normath() to macpath.py
* renamed nntp.py to nntplib.py
* Made string.index() compatible with strop.index()
* Make string.atoi('') raise string.atoi_error rather than ValueError
* Added dirname() and normpath() to posixpath.
Diffstat (limited to 'Lib/pdb.py')
-rwxr-xr-x | Lib/pdb.py | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -120,6 +120,7 @@ class Pdb(bdb.Bdb, cmd.Cmd): self.curindex = self.curindex - 1 self.curframe = self.stack[self.curindex][0] self.print_stack_entry(self.stack[self.curindex]) + self.lineno = None do_u = do_up def do_down(self, arg): @@ -129,6 +130,7 @@ class Pdb(bdb.Bdb, cmd.Cmd): self.curindex = self.curindex + 1 self.curframe = self.stack[self.curindex][0] self.print_stack_entry(self.stack[self.curindex]) + self.lineno = None do_d = do_down def do_step(self, arg): @@ -193,7 +195,7 @@ class Pdb(bdb.Bdb, cmd.Cmd): # Assume it's a count last = first + last else: - first = int(x) + first = max(1, int(x) - 5) except: print '*** Error in argument:', `arg` return @@ -201,7 +203,7 @@ class Pdb(bdb.Bdb, cmd.Cmd): first = max(1, self.curframe.f_lineno - 5) else: first = self.lineno + 1 - if last is None: + if last == None: last = first + 10 filename = self.curframe.f_code.co_filename breaklist = self.get_file_breaks(filename) |