Slide 90
Slide 90 text
__ltrace__ feature
Python 3.7.0a0 (default:897fe8fa14b5+, Oct 15 2016, 09:56:54)
>>> __ltrace__ = 'an object'
>>> def foo(bar): return bar + 1
...
0: LOAD_CONST, 0
2: LOAD_CONST, 1
4: MAKE_FUNCTION, 0
6: STORE_NAME, 0
8: LOAD_CONST, 2
10: RETURN_VALUE
>>> print(foo(2))
0: LOAD_NAME, 0
2: LOAD_NAME, 1
4: LOAD_CONST, 0
6: CALL_FUNCTION, 1
0: LOAD_FAST, 0
2: LOAD_CONST, 1
4: BINARY_ADD
6: RETURN_VALUE
8: CALL_FUNCTION, 1
3
10: PRINT_EXPR
12: LOAD_CONST, 1
14: RETURN_VALUE
>>>
89 / 94