Created
October 1, 2018 17:10
-
-
Save JackInTaiwan/ddb397889dce9f26c196bc7241736e1b to your computer and use it in GitHub Desktop.
python_advanced_private_4
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 Animal: | |
def __init__(self): | |
self.__alive = True | |
def __print_something(self): | |
print("shxt!!!") | |
dog = Animal() | |
print(dog._Animal__alive) | |
# True | |
dog._Animal__print_something() | |
# shxt!!! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment