Created
August 26, 2018 14:02
-
-
Save laixintao/bb4330651c33124d52ff888b99c9e939 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [4]: def func(a, b): | |
...: a, b = b ,a | |
...: | |
In [5]: dis.dis(func) | |
2 0 LOAD_FAST 1 (b) | |
2 LOAD_FAST 0 (a) | |
4 ROT_TWO | |
6 STORE_FAST 0 (a) | |
8 STORE_FAST 1 (b) | |
10 LOAD_CONST 0 (None) | |
12 RETURN_VALUE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment