Last active
August 29, 2015 14:01
-
-
Save chaliy/aca75eb7055ee2f553fa 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
# What output you expect form this? | |
class Fooker(object): | |
def __init__(self, items = []): | |
self.items = items | |
def append(self, item): | |
self.items.append(item) | |
o = Fooker() | |
o.append("1234") | |
print(o.items) | |
o1 = Fooker() | |
o1.append("1234") | |
print(o1.items) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Good to know, but seems too un-obvious to me..