Last active
December 21, 2019 16:06
-
-
Save FerdinaKusumah/37281231d6ff8edcc8bbf0a04b289800 to your computer and use it in GitHub Desktop.
Underscore Python
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 ManglingTest: | |
def __init__(self): | |
self.__mangled = 'hello' | |
def get_mangled(self): | |
return self.__mangled | |
>>> ManglingTest().get_mangled() | |
'hello' | |
>>> ManglingTest().__mangled | |
AttributeError: "'ManglingTest' object has no attribute '__mangled'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment