Created
July 7, 2014 23:28
-
-
Save raek/3cfc0c11f5c97d7335f8 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 Foo(object): | |
def __init__(self, a_value): | |
self.a = a_value # Create public instance variable and assign it | |
f = Foo(123) | |
print(f.a) | |
f.a = 1 | |
print(f.a) | |
f.a = -1 | |
print(f.a) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment