Skip to content

Commit ae8a721

Browse files
Update pdb docs for arguments (GH-102965)
(cherry picked from commit 027223d) Co-authored-by: gaogaotiantian <[email protected]>
1 parent db5bf52 commit ae8a721

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

Doc/library/pdb.rst

+21-21
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ slightly different way:
125125

126126
Evaluate the *expression* (given as a string or a code object) under debugger
127127
control. When :func:`runeval` returns, it returns the value of the
128-
expression. Otherwise this function is similar to :func:`run`.
128+
*expression*. Otherwise this function is similar to :func:`run`.
129129

130130

131131
.. function:: runcall(function, *args, **kwds)
@@ -178,7 +178,7 @@ access further features, you have to do this yourself:
178178
that matches one of these patterns. [1]_
179179

180180
By default, Pdb sets a handler for the SIGINT signal (which is sent when the
181-
user presses :kbd:`Ctrl-C` on the console) when you give a ``continue`` command.
181+
user presses :kbd:`Ctrl-C` on the console) when you give a :pdbcmd:`continue` command.
182182
This allows you to break into the debugger again by pressing :kbd:`Ctrl-C`. If you
183183
want Pdb not to touch the SIGINT handler, set *nosigint* to true.
184184

@@ -324,9 +324,9 @@ by the local file.
324324

325325
.. pdbcommand:: ignore bpnumber [count]
326326

327-
Set the ignore count for the given breakpoint number. If count is omitted,
327+
Set the ignore count for the given breakpoint number. If *count* is omitted,
328328
the ignore count is set to 0. A breakpoint becomes active when the ignore
329-
count is zero. When non-zero, the count is decremented each time the
329+
count is zero. When non-zero, the *count* is decremented each time the
330330
breakpoint is reached and the breakpoint is not disabled and any associated
331331
condition evaluates to true.
332332

@@ -365,7 +365,7 @@ by the local file.
365365
breakpoint—which could have its own command list, leading to ambiguities about
366366
which list to execute.
367367

368-
If you use the 'silent' command in the command list, the usual message about
368+
If you use the ``silent`` command in the command list, the usual message about
369369
stopping at a breakpoint is not printed. This may be desirable for breakpoints
370370
that are to print a specific message and then continue. If none of the other
371371
commands print anything, you see no sign that the breakpoint was reached.
@@ -388,8 +388,8 @@ by the local file.
388388
Without argument, continue execution until the line with a number greater
389389
than the current one is reached.
390390

391-
With a line number, continue execution until a line with a number greater or
392-
equal to that is reached. In both cases, also stop when the current frame
391+
With *lineno*, continue execution until a line with a number greater or
392+
equal to *lineno* is reached. In both cases, also stop when the current frame
393393
returns.
394394

395395
.. versionchanged:: 3.2
@@ -442,7 +442,7 @@ by the local file.
442442

443443
.. pdbcommand:: p expression
444444

445-
Evaluate the *expression* in the current context and print its value.
445+
Evaluate *expression* in the current context and print its value.
446446

447447
.. note::
448448

@@ -452,32 +452,32 @@ by the local file.
452452

453453
.. pdbcommand:: pp expression
454454

455-
Like the :pdbcmd:`p` command, except the value of the expression is
455+
Like the :pdbcmd:`p` command, except the value of *expression* is
456456
pretty-printed using the :mod:`pprint` module.
457457

458458
.. pdbcommand:: whatis expression
459459

460-
Print the type of the *expression*.
460+
Print the type of *expression*.
461461

462462
.. pdbcommand:: source expression
463463

464-
Try to get source code for the given object and display it.
464+
Try to get source code of *expression* and display it.
465465

466466
.. versionadded:: 3.2
467467

468468
.. pdbcommand:: display [expression]
469469

470-
Display the value of the expression if it changed, each time execution stops
470+
Display the value of *expression* if it changed, each time execution stops
471471
in the current frame.
472472

473-
Without expression, list all display expressions for the current frame.
473+
Without *expression*, list all display expressions for the current frame.
474474

475475
.. versionadded:: 3.2
476476

477477
.. pdbcommand:: undisplay [expression]
478478

479-
Do not display the expression any more in the current frame. Without
480-
expression, clear all display expressions for the current frame.
479+
Do not display *expression* anymore in the current frame. Without
480+
*expression*, clear all display expressions for the current frame.
481481

482482
.. versionadded:: 3.2
483483

@@ -493,10 +493,10 @@ by the local file.
493493

494494
.. pdbcommand:: alias [name [command]]
495495

496-
Create an alias called *name* that executes *command*. The command must
496+
Create an alias called *name* that executes *command*. The *command* must
497497
*not* be enclosed in quotes. Replaceable parameters can be indicated by
498498
``%1``, ``%2``, and so on, while ``%*`` is replaced by all the parameters.
499-
If no command is given, the current alias for *name* is shown. If no
499+
If *command* is omitted, the current alias for *name* is shown. If no
500500
arguments are given, all aliases are listed.
501501

502502
Aliases may be nested and can contain anything that can be legally typed at
@@ -515,7 +515,7 @@ by the local file.
515515

516516
.. pdbcommand:: unalias name
517517

518-
Delete the specified alias.
518+
Delete the specified alias *name*.
519519

520520
.. pdbcommand:: ! statement
521521

@@ -531,7 +531,7 @@ by the local file.
531531
.. pdbcommand:: run [args ...]
532532
restart [args ...]
533533

534-
Restart the debugged Python program. If an argument is supplied, it is split
534+
Restart the debugged Python program. If *args* is supplied, it is split
535535
with :mod:`shlex` and the result is used as the new :data:`sys.argv`.
536536
History, breakpoints, actions and debugger options are preserved.
537537
:pdbcmd:`restart` is an alias for :pdbcmd:`run`.
@@ -542,8 +542,8 @@ by the local file.
542542

543543
.. pdbcommand:: debug code
544544

545-
Enter a recursive debugger that steps through the code
546-
argument (which is an arbitrary expression or statement to be
545+
Enter a recursive debugger that steps through *code*
546+
(which is an arbitrary expression or statement to be
547547
executed in the current environment).
548548

549549
.. pdbcommand:: retval

0 commit comments

Comments
 (0)