[Python-checkins] r83264 - in python/branches/py3k: Doc/library/pdb.rst Lib/pdb.py

georg.brandl python-checkins at python.org
Fri Jul 30 10:45:26 CEST 2010


Author: georg.brandl
Date: Fri Jul 30 10:45:26 2010
New Revision: 83264

Log:
Document the "jump" command in pdb.__doc__, and add a version tag for "until X".

Modified:
   python/branches/py3k/Doc/library/pdb.rst
   python/branches/py3k/Lib/pdb.py

Modified: python/branches/py3k/Doc/library/pdb.rst
==============================================================================
--- python/branches/py3k/Doc/library/pdb.rst	(original)
+++ python/branches/py3k/Doc/library/pdb.rst	Fri Jul 30 10:45:26 2010
@@ -339,6 +339,9 @@
    equal to that is reached.  In both cases, also stop when the current frame
    returns.
 
+   .. versionchanged:: 3.2
+      Allow giving an explicit line number.
+
 .. pdbcommand:: r(eturn)
 
    Continue execution until the current function returns.

Modified: python/branches/py3k/Lib/pdb.py
==============================================================================
--- python/branches/py3k/Lib/pdb.py	(original)
+++ python/branches/py3k/Lib/pdb.py	Fri Jul 30 10:45:26 2010
@@ -147,6 +147,16 @@
         or equal to that is reached.  In both cases, also stop when
         the current frame returns.
 
+j(ump) lineno
+        Set the next line that will be executed.  Only available in
+        the bottom-most frame.  This lets you jump back and execute
+        code again, or jump forward to skip code that you don't want
+        to run.
+
+        It should be noted that not all jumps are allowed -- for
+        instance it is not possible to jump into the middle of a
+        for loop or out of a finally clause.
+
 r(eturn)
         Continue execution until the current function returns.
 


More information about the Python-checkins mailing list