Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
c9879246
Kaydet (Commit)
c9879246
authored
Eyl 04, 2007
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add "print" command to pdb, "print s" previously invoked the print statement.
üst
cb8ecb14
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
10 deletions
+7
-10
pdb.rst
Doc/library/pdb.rst
+4
-9
pdb.py
Lib/pdb.py
+3
-1
No files found.
Doc/library/pdb.rst
Dosyayı görüntüle @
c9879246
...
@@ -61,11 +61,11 @@ Typical usage to inspect a crashed program is::
...
@@ -61,11 +61,11 @@ Typical usage to inspect a crashed program is::
File "./mymodule.py", line 4, in test
File "./mymodule.py", line 4, in test
test2()
test2()
File "./mymodule.py", line 3, in test2
File "./mymodule.py", line 3, in test2
print
spam
print
(spam)
NameError: spam
NameError: spam
>>> pdb.pm()
>>> pdb.pm()
> ./mymodule.py(3)test2()
> ./mymodule.py(3)test2()
-> print
spam
-> print
(spam)
(Pdb)
(Pdb)
The module defines the following functions; each enters the debugger in a
The module defines the following functions; each enters the debugger in a
...
@@ -283,14 +283,9 @@ l(ist) [*first*\ [, *last*]]
...
@@ -283,14 +283,9 @@ l(ist) [*first*\ [, *last*]]
a(rgs)
a(rgs)
Print the argument list of the current function.
Print the argument list of the current function.
p *expression*
p
(rint)
*expression*
Evaluate the *expression* in the current context and print its value.
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*
pp *expression*
Like the ``p`` command, except the value of the expression is pretty-printed
Like the ``p`` command, except the value of the expression is pretty-printed
using the :mod:`pprint` module.
using the :mod:`pprint` module.
...
@@ -312,7 +307,7 @@ alias [*name* [command]]
...
@@ -312,7 +307,7 @@ alias [*name* [command]]
:file:`.pdbrc` file)::
:file:`.pdbrc` file)::
#Print instance variables (usage "pi classInst")
#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
#Print instance variables in self
alias ps pi self
alias ps pi self
...
...
Lib/pdb.py
Dosyayı görüntüle @
c9879246
...
@@ -716,6 +716,8 @@ class Pdb(bdb.Bdb, cmd.Cmd):
...
@@ -716,6 +716,8 @@ class Pdb(bdb.Bdb, cmd.Cmd):
print
(
repr
(
self
.
_getval
(
arg
)),
file
=
self
.
stdout
)
print
(
repr
(
self
.
_getval
(
arg
)),
file
=
self
.
stdout
)
except
:
except
:
pass
pass
# make "print" an alias of "p" since print isn't a Python statement anymore
do_print
=
do_p
def
do_pp
(
self
,
arg
):
def
do_pp
(
self
,
arg
):
try
:
try
:
...
@@ -1009,7 +1011,7 @@ if the second argument is less than the first, it is a count.""", file=self.stdo
...
@@ -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
)
Print the arguments of the current function."""
,
file
=
self
.
stdout
)
def
help_p
(
self
):
def
help_p
(
self
):
print
(
"""p expression
print
(
"""p
(rint)
expression
Print the value of the expression."""
,
file
=
self
.
stdout
)
Print the value of the expression."""
,
file
=
self
.
stdout
)
def
help_pp
(
self
):
def
help_pp
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment