Aaron Brady wrote:

But wait, is that true assignment?

It's assignment, but it's not really copying an object. No new
objects are being created -- rather, some of the items within
the lhs object are being rebound to already-existing objects.

It would be possible for the lhs object's __setitem__ method
to be defined so that it created new objects, but then it
would be the __setitem__ method doing that, not the assignment
statement itself.

None of this is really relevant anyway, since the assignment
that call-by-value implies is always to a bare local name, and
there is no way that kind of assignment can ever create a new
object.

--
Greg
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to