1>>> import dis
2>>> def foo(a, b):
3... a, b = b, a
4...
5>>> dis.dis(foo)
6 2 0 LOAD_FAST 1 (b)
7 3 LOAD_FAST 0 (a)
8 6 ROT_TWO
9 7 STORE_FAST 0 (a)
10 10 STORE_FAST 1 (b)
11 13 LOAD_CONST 0 (None)
12 16 RETURN_VALUE