Skip to content

Instantly share code, notes, and snippets.

@JackInTaiwan
Created October 1, 2018 17:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JackInTaiwan/ddb397889dce9f26c196bc7241736e1b to your computer and use it in GitHub Desktop.
Save JackInTaiwan/ddb397889dce9f26c196bc7241736e1b to your computer and use it in GitHub Desktop.
python_advanced_private_4
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