dis

Stdlib — IntrospectionPython 2.0+Expert

Disassemble Python bytecode to human-readable instructions

Quick Info

Documentation
Official Docs
Python Version
2.0+
Dependencies
None — Python Standard Library
Install
Included with Python

Learn by Difficulty

Quick Example

python
import dis

def example(x, y):
    return x + y * 2

print("Bytecode for 'x + y * 2':")
dis.dis(example)

The dis module is part of Python's standard library. Disassemble Python bytecode to human-readable instructions.

Try in Playground

Tags

stdlibintrospectionbytecodeinternals

Related Items