pout
pout copied to clipboard
Can I do anything with the dis module?
https://docs.python.org/3/library/dis.html
def sum_range(x, y):
return sum(range(x, y))
>>> dis.dis(sum_range)
2 0 LOAD_GLOBAL 0 (sum)
2 LOAD_GLOBAL 1 (range)
4 LOAD_FAST 0 (x)
6 LOAD_FAST 1 (y)
8 CALL_FUNCTION 2
10 CALL_FUNCTION 1
12 RETURN_VALUE