dis.disassemble(code, lasti=-1, *, file=None)
dis.disco(code, lasti=-1, *, file=None)
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
- the current instruction, indicated as
-->
, - a labelled instruction, indicated with
>>
, - the address of the instruction,
- the operation code name,
- operation parameters, and
- interpretation of the parameters in parentheses.
The parameter interpretation recognizes local and global variable names, constant values, branch targets, and compare operators.
The disassembly is written as text to the supplied file argument if provided and to sys.stdout
otherwise.
Changed in version 3.4: Added file parameter.
Please login to continue.