What I want is this behavior:
class a:
list=[]
y=a()
x=a()
x.list.append(1)
y.list.append(2)
x.list.append(3)
y.list.append(4)
print x.list
[1,3]
print y.list
[2,4]
of course, what really happens when I print is:
print x.list
[1,2,3,4]
print y.list
[1,2,3,4]
clearly they are sharing the data in class a
. how do I get separate instances to achieve the behavior I desire?