summaryrefslogtreecommitdiffstats
path: root/Doc/library/pdb.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-09-04 07:07:56 (GMT)
committerGeorg Brandl <georg@python.org>2007-09-04 07:07:56 (GMT)
commitc9879246a2dd33a217960496fdf4606cb117c6a6 (patch)
tree86c2387b071ea812c9404da4eada441f899e699a /Doc/library/pdb.rst
parentcb8ecb142be4ea3335fd7f8c1722e95ef5563fc7 (diff)
downloadcpython-c9879246a2dd33a217960496fdf4606cb117c6a6.zip
cpython-c9879246a2dd33a217960496fdf4606cb117c6a6.tar.gz
cpython-c9879246a2dd33a217960496fdf4606cb117c6a6.tar.bz2
Add "print" command to pdb, "print s" previously invoked the print statement.
Diffstat (limited to 'Doc/library/pdb.rst')
-rw-r--r--Doc/library/pdb.rst13
1 files changed, 4 insertions, 9 deletions
diff --git a/Doc/library/pdb.rst b/Doc/library/pdb.rst
index 4befa4c..b85afde 100644
--- a/Doc/library/pdb.rst
+++ b/Doc/library/pdb.rst
@@ -61,11 +61,11 @@ Typical usage to inspect a crashed program is::
File "./mymodule.py", line 4, in test
test2()
File "./mymodule.py", line 3, in test2
- print spam
+ print(spam)
NameError: spam
>>> pdb.pm()
> ./mymodule.py(3)test2()
- -> print spam
+ -> print(spam)
(Pdb)
The module defines the following functions; each enters the debugger in a
@@ -283,14 +283,9 @@ l(ist) [*first*\ [, *last*]]
a(rgs)
Print the argument list of the current function.
-p *expression*
+p(rint) *expression*
Evaluate the *expression* in the current context and print its value.
- .. note::
-
- ``print`` can also be used, but is not a debugger command --- this executes the
- Python :keyword:`print` statement.
-
pp *expression*
Like the ``p`` command, except the value of the expression is pretty-printed
using the :mod:`pprint` module.
@@ -312,7 +307,7 @@ alias [*name* [command]]
:file:`.pdbrc` file)::
#Print instance variables (usage "pi classInst")
- alias pi for k in %1.__dict__.keys(): print "%1.",k,"=",%1.__dict__[k]
+ alias pi for k in %1.__dict__.keys(): print("%1.",k,"=",%1.__dict__[k])
#Print instance variables in self
alias ps pi self