Skip to content

Instantly share code, notes, and snippets.

@jamezpolley
Created January 29, 2012 22:01
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 jamezpolley/1700920 to your computer and use it in GitHub Desktop.
Save jamezpolley/1700920 to your computer and use it in GitHub Desktop.
james@bodacious-wired:~$cat test.py
#!/usr/bin/env python
class MyClass:
element1 = "Hello"
def __init__(self):
self.element2 = "World"
obj1 = MyClass()
obj2 = MyClass()
obj1.element1 = "Goodbye"
print obj1.element1 + " " + obj2.element2
print obj2.element1 + " " + obj1.element2
james@bodacious-wired:~$./test.py
Goodbye World
Hello World
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment