Created
October 14, 2015 20:20
-
-
Save jcdyer/51b25b50c2f94010a70f 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
>>> def f(): | |
... return {1, 2, 3} | |
... | |
>>> dis.dis(f) | |
2 0 LOAD_CONST 1 (1) | |
3 LOAD_CONST 2 (2) | |
6 LOAD_CONST 3 (3) | |
9 BUILD_SET 3 | |
12 RETURN_VALUE | |
>>> def g(): | |
... return set([1, 2, 3]) | |
... | |
>>> dis.dis(g) | |
2 0 LOAD_GLOBAL 0 (set) | |
3 LOAD_CONST 1 (1) | |
6 LOAD_CONST 2 (2) | |
9 LOAD_CONST 3 (3) | |
12 BUILD_LIST 3 | |
15 CALL_FUNCTION 1 | |
18 RETURN_VALUE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment