HSG |
|
dis - Disassembler for Python bytecode
>>> def p(): a = 2 b = 3 c = a + b print(c) >>> import dis >>> dis.dis(p) 2 0 LOAD_CONST 1 (2) 3 STORE_FAST 0 (a) 3 6 LOAD_CONST 2 (3) 9 STORE_FAST 1 (b) 4 12 LOAD_FAST 0 (a) 15 LOAD_FAST 1 (b) 18 BINARY_ADD 19 STORE_FAST 2 (c) 5 22 LOAD_GLOBAL 0 (print) 25 LOAD_FAST 2 (c) 28 CALL_FUNCTION 1 31 POP_TOP 32 LOAD_CONST 0 (None) 35 RETURN_VALUE