Skip to content

Instantly share code, notes, and snippets.

@raek
Created July 7, 2014 23:28
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 raek/3cfc0c11f5c97d7335f8 to your computer and use it in GitHub Desktop.
Save raek/3cfc0c11f5c97d7335f8 to your computer and use it in GitHub Desktop.
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