dis
Disassembles methods, functions, classes and other objects in python.
import dis
def inc(x):
x += 1
return x
dis.dis(inc)
# 2 0 LOAD_FAST 0 (x)
# 2 LOAD_CONST 1 (1)
# 4 INPLACE_ADD
# 6 STORE_FAST 0 (x)
#
# 3 8 LOAD_FAST 0 (x)
# 10 RETURN_VALUE