Skip to content
Prev Previous commit
Next Next commit
Add example of exclamation mark prefix for disambiguation
  • Loading branch information
SnoopJ committed May 8, 2023
commit 1a427c57d9e5f66793a6807dae69a3d43db8365f
11 changes: 8 additions & 3 deletions Doc/library/pdb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -602,9 +602,14 @@ can be overridden by the local file.

Execute the (one-line) *statement* in the context of the current stack frame.
The exclamation point can be omitted unless the first word of the statement
resembles a debugger command. To set a global variable, you can prefix the
assignment command with a :keyword:`global` statement on the same line,
e.g.::
resembles a debugger command, e.g.::

(Pdb) !next(some_iterator)
42
(Pdb)

To set a global variable, you can prefix the assignment command with a
:keyword:`global` statement on the same line, e.g.::

(Pdb) global list_options; list_options = ['-l']
(Pdb)
Expand Down