Last active
September 20, 2015 10:36
-
-
Save 4e1e0603/0bfba2cd82cad0d16bc0 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
class A(object): | |
def __init__(self): | |
self.__var = 1 | |
def __private(self): | |
print("--private--") | |
a = A() | |
print(A.__dict__.keys()) | |
a._A__private() | |
print(a._A__var) | |
a.test = 2 | |
print(a.test) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment