I want this:
class Obj:
def __init__(self):
self.number = 10
self.seq = [1,2,3]
self.seq2 = [3,4,5]
def calculate(self):
return sum(self.seq) + self.number + len(self.seq2)
obj = Obj()
# so I want to semi-copy `obj`. With the only difference that `seq` refers to a differnt object. So for example
obj2 = semicopy(obj)
# now if I say
obj2.seq = [0.1, 0.2, 0.3] # it will only change on obj2
# but if I say
obj1.seq2 = [0.3, 0.4, 0.5] # it will change on both because it isnt copied