Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update docs
  • Loading branch information
picnixz committed Aug 21, 2024
commit 2356ef5dc58588af20125c431859e57c3d5f1f86
13 changes: 7 additions & 6 deletions Doc/library/dis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ interpreter.
option and the ``show_offsets`` argument were added.

.. versionchanged:: 3.14
Added the :option:`-P <dis --show-positions>` command-line option
and the ``show_positions`` argument.
The :option:`-P <dis --show-positions>` command-line option
and the ``show_positions`` argument were added.

Example: Given the function :func:`!myfunc`::

Expand Down Expand Up @@ -109,7 +109,7 @@ The following options are accepted:

.. cmdoption:: -P, --show-positions

Show positions of instructions.
Show positions of instructions in the source code.

If :file:`infile` is specified, its disassembled code will be written to stdout.
Otherwise, disassembly is performed on compiled source code received from stdin.
Expand Down Expand Up @@ -154,7 +154,7 @@ code.
offsets in the output.

If *show_positions* is ``True``, :meth:`.dis` will include instruction
positions in the output.
source code positions in the output.

Comment thread
picnixz marked this conversation as resolved.
.. classmethod:: from_traceback(tb, *, show_caches=False)

Expand Down Expand Up @@ -319,8 +319,9 @@ operation is being performed, so the intermediate analysis object isn't useful:
Disassemble a code object, indicating the last instruction if *lasti* was
provided. The output is divided in the following columns:

#. the line number, for the first instruction of each line, or the
instruction positions if *show_positions* is true.
#. the source code location of the instruction. Complete location information
is shown if *show_positions* is true. Otherwise (the default) only the
line number is displayed.
#. the current instruction, indicated as ``-->``,
#. a labelled instruction, indicated with ``>>``,
#. the address of the instruction,
Expand Down