Michael wrote: > Okay > > Just when I think I am getting it you throw this in. You're welcome. > So why does a become local to each variable but b seem global? > A better way to ask that is "why does a become an instance property but b remain a class property?"
f.a = 3 This is an assignment statement. It creates a property of the instance. The class property a is ignored. f.b.append(1) This is not an assignment. It references a property of the instance that does not exist, so Python goes up the inheritance hierarchy and finds the class property. HTH _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor