Created
January 29, 2012 22:01
-
-
Save jamezpolley/1700920 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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