On 13.06.2005, at 19:23, Terry Reedy wrote: > > "harold fellermann" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >> if you write >>>>> a=A() >> an instance of class A is created and bound to the local identifier >> 'a'. > > I think it perhaps better to think of the label 'a' being bound to the > object rather than vice versa. For one, a label can only be bound > (stuck > to, like a stick note) to one object at a time while one object can > have > many labels (and other references) stuck to it. > >> If you later write >>>>> a=5 >> the object 5 is reassigned to the same identifier, > > Or one could say that the label 'a' is removed from the A() object and > reassigned to the 5 object. Since the 5 object may have numerous other > connections, and since those connections are unaffected by the new > connection to 'a', whereas the previous assignment of 'a' is broken, I > think it better to say that 'a' is being reassigned, not 5.
yeah. I have never seen it this way, but you are right! Binding the identifier/label to the object is a much better perspective. thanks for the lesson :) - harold - -- Ceci n'est pas une signature. -- -- http://mail.python.org/mailman/listinfo/python-list