In article <mailman.7801.1232715276.3487.python-l...@python.org>, Steve Holden <st...@holdenweb.com> wrote: > >I understand what you are saying, but if the id() associated with a name >doesn't change after augmented assignment it seems a little wrong-headed >to argue that "the augmented assignment always binds a new value to the >name". > >What you are actually saying is that it's up to the method that >implements the augmented assignment whether the same (mutated) object or >a different one is returned, right? And that the left-hand side of the >assignment is always bound to the result of that method.
That's overall more correct, but I wanted to emphasize that there is *always* a binding operation being performed. Whether what gets bound to the target is a new object or an existing object is up to the augmented assignment method. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ Weinberg's Second Law: If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization. -- http://mail.python.org/mailman/listinfo/python-list