I have really strange problem. Here is the sample code:
class SomeClass(object):
a = []
b = []
def __init__(self, *args, **kwargs):
self.a = [(1,2), (3,4)]
self.b = self.a
self.a.append((5,6))
print self.b
SomeClass()
Print outputs [(1, 2), (3, 4), (5, 6)], but why, why result isn't [(1,2), (3,4)] ? Do you know how can I have the old value of self.a in self.b?
Thank you!