>>> def f(x): ... return x * x ... >>> import dis >>> print dis.dis(f) 2 0 LOAD_FAST 0 (x) 3 LOAD_FAST 0 (x) 6 BINARY_MULTIPLY 7 RETURN_VALUE