diff options
author | Georg Brandl <georg@python.org> | 2010-07-30 09:14:20 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-07-30 09:14:20 (GMT) |
commit | 46b9afc862974e5855f0ca8a181096945483c86e (patch) | |
tree | 8ad8005224efaf00ef06fbb4c609b5eb6091d6ad /Doc/library/pdb.rst | |
parent | 44f8bf941109c24d36d7d6e4dd05080a0191f3d9 (diff) | |
download | cpython-46b9afc862974e5855f0ca8a181096945483c86e.zip cpython-46b9afc862974e5855f0ca8a181096945483c86e.tar.gz cpython-46b9afc862974e5855f0ca8a181096945483c86e.tar.bz2 |
#1472251: remove addition of "\n" to code given to pdb.run[eval](), the bug in exec() that made this necessary has been fixed. Also document that you can give code objects to run() and runeval(), and add some tests to test_pdb.
Diffstat (limited to 'Doc/library/pdb.rst')
-rw-r--r-- | Doc/library/pdb.rst | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Doc/library/pdb.rst b/Doc/library/pdb.rst index 4e79bad..6da5332 100644 --- a/Doc/library/pdb.rst +++ b/Doc/library/pdb.rst @@ -85,21 +85,21 @@ slightly different way: .. function:: run(statement, globals=None, locals=None) - Execute the *statement* (given as a string) under debugger control. The - debugger prompt appears before any code is executed; you can set breakpoints - and type :pdbcmd:`continue`, or you can step through the statement using - :pdbcmd:`step` or :pdbcmd:`next` (all these commands are explained below). - The optional *globals* and *locals* arguments specify the environment in - which the code is executed; by default the dictionary of the module - :mod:`__main__` is used. (See the explanation of the built-in :func:`exec` - or :func:`eval` functions.) + Execute the *statement* (given as a string or a code object) under debugger + control. The debugger prompt appears before any code is executed; you can + set breakpoints and type :pdbcmd:`continue`, or you can step through the + statement using :pdbcmd:`step` or :pdbcmd:`next` (all these commands are + explained below). The optional *globals* and *locals* arguments specify the + environment in which the code is executed; by default the dictionary of the + module :mod:`__main__` is used. (See the explanation of the built-in + :func:`exec` or :func:`eval` functions.) .. function:: runeval(expression, globals=None, locals=None) - Evaluate the *expression* (given as a string) under debugger control. When - :func:`runeval` returns, it returns the value of the expression. Otherwise - this function is similar to :func:`run`. + Evaluate the *expression* (given as a string or a code object) under debugger + control. When :func:`runeval` returns, it returns the value of the + expression. Otherwise this function is similar to :func:`run`. .. function:: runcall(function, *args, **kwds) |