=== modified file 'Doc/library/pdb.rst' --- Doc/library/pdb.rst 2008-05-11 14:17:13 +0000 +++ Doc/library/pdb.rst 2008-10-22 19:29:36 +0000 @@ -292,7 +292,8 @@ List source code for the current file. Without arguments, list 11 lines around the current line or continue the previous listing. With one argument, list 11 lines around at that line. With two arguments, list the given range; if the - second argument is less than the first, it is interpreted as a count. + second argument is less than the first, it is interpreted as a count. Use ``l .`` + to return focus to the currently debugged line. a(rgs) Print the argument list of the current function. === modified file 'Lib/pdb.py' --- Lib/pdb.py 2008-08-01 01:36:47 +0000 +++ Lib/pdb.py 2008-10-22 19:25:26 +0000 @@ -743,7 +743,7 @@ def do_list(self, arg): self.lastcmd = 'list' last = None - if arg: + if arg and arg != '.': try: x = eval(arg, {}, {}) if type(x) == type(()): @@ -758,7 +758,8 @@ except: print >>self.stdout, '*** Error in argument:', repr(arg) return - elif self.lineno is None: + elif self.lineno is None or arg == '.': + # Start at the currently debugged line first = max(1, self.curframe.f_lineno - 5) else: first = self.lineno + 1 @@ -1024,7 +1025,8 @@ or continue the previous listing. With one argument, list 11 lines starting at that line. With two arguments, list the given range; -if the second argument is less than the first, it is a count.""" +if the second argument is less than the first, it is a count. +Use "l ." to return focus to the currently debugged line.""" def help_args(self): self.help_a()