Hi, let X be a mutable container, such as dict/set/list=bytearray, and Y=X, When I change X, Y will follow it, having always the same value, although id(X)!=id(Y). How is that, what is the explanation? Meanwhile the same for immutable types results a real copy, and so does for simple mutables such as int.
I suspect it has something to do with pointers, but what is the difference between mutables and immutables, and why have they different id's if they are the same?
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor