Skip to content

Instantly share code, notes, and snippets.

@nvie
Created March 3, 2010 23:02
Show Gist options
  • Save nvie/321157 to your computer and use it in GitHub Desktop.
Save nvie/321157 to your computer and use it in GitHub Desktop.
class Foo:
x = 3
def __init__(self, id):
self.x = id
f1 = Foo(5)
print f1.x # 5, as expected
f2 = Foo(6)
print f2.x # 6, as expected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment