Skip to content

Instantly share code, notes, and snippets.

@alopatindev
Created March 20, 2016 15:43
Show Gist options
  • Save alopatindev/54d2ffc0925c306ba21b to your computer and use it in GitHub Desktop.
Save alopatindev/54d2ffc0925c306ba21b to your computer and use it in GitHub Desktop.
array_wut.py
class A:
x = 1
a = A()
b = A()
a.x += 1
print (a.x, b.x) # 1 2
class B:
x = []
c = B()
d = B()
c.x.append(1)
print(c.x, d.x) # [1] [1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment