Created
January 21, 2017 23:30
-
-
Save solominh/a617856f2acbeeaa174936c5688fc1ea 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 Person(): | |
static_property = 10 | |
def __init__(self, name): | |
self.name = name | |
john = Person('john') | |
print(john.static_property) # 10 => find in prototype | |
john.static_property = 5 # Create new own property | |
print(Person.static_property) # 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment