On 22/01/2008, John Morris <[EMAIL PROTECTED]> wrote: > I thought each class got it's own namespace and this sharing of mutable > objects is confusing me.
Each class gets its own namespace, but names are different from objects. For example: >>> x = [1, 2, 3] >>> y = x >>> y.append(4) >>> x [1, 2, 3, 4] In this case, x and y are both different names for the same object. Classes increase the name space, but they don't change the fact that in python, assignment is just giving something a new name. -- John. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor