summaryrefslogtreecommitdiffstats
path: root/Lib/pdb.py
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 /Lib/pdb.py
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 'Lib/pdb.py')
-rwxr-xr-xLib/pdb.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/pdb.py b/Lib/pdb.py
index 3bbf76b..8a52778 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -716,6 +716,8 @@ class Pdb(bdb.Bdb, cmd.Cmd):
print(repr(self._getval(arg)), file=self.stdout)
except:
pass
+ # make "print" an alias of "p" since print isn't a Python statement anymore
+ do_print = do_p
def do_pp(self, arg):
try:
@@ -1009,7 +1011,7 @@ if the second argument is less than the first, it is a count.""", file=self.stdo
Print the arguments of the current function.""", file=self.stdout)
def help_p(self):
- print("""p expression
+ print("""p(rint) expression
Print the value of the expression.""", file=self.stdout)
def help_pp(self):