Skip to content

Instantly share code, notes, and snippets.

@JackInTaiwan
Last active October 1, 2018 16:02
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/49f0a7943c5faa5a2c593fc01c4ab9eb to your computer and use it in GitHub Desktop.
Save JackInTaiwan/49f0a7943c5faa5a2c593fc01c4ab9eb to your computer and use it in GitHub Desktop.
python_advanced_private_1
class Animal:
blood = True
__alive = True
print(Animal.blood)
# True
print(Animal.alive)
# Error: AttributeError: type object 'Animal' has no attribute 'alive'
print(Animal.__alive)
# Error: AttributeError: type object 'Animal' has no attribute '__alive'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment