Created
January 23, 2018 09:42
-
-
Save superbobry/218214191f20735117345ceb89a6d46e to your computer and use it in GitHub Desktop.
Python name mangling
This file contains hidden or 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
>>> class A: | |
... def __init__(self, __foo): | |
... print(__foo) | |
... | |
>>> dis.dis(A.__init__) | |
3 0 LOAD_GLOBAL 0 (print) | |
2 LOAD_FAST 1 (_A__foo) | |
4 CALL_FUNCTION 1 | |
6 POP_TOP | |
8 LOAD_CONST 0 (None) | |
10 RETURN_VALUE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment