list operation '+= ' or assignment problem

Alex Martelli aleaxit at yahoo.com
Thu Jan 4 09:15:22 EST 2001


"Fredrik Lundh" <fredrik at effbot.org> wrote in message
news:xX_46.2919$AH6.516601 at newsc.telia.net...
> Joe Smith wrote:
> > I guess that list assignment is an assignment of the reference
> > to the object and it does not copy the object.  Where as a
> > string object gets copied.
>
> Alex: No.
> Erno: No.
> Greg: Yes, in a way.
> Steve: Yes.
> Tim: No.
>
> time for a poll? ;-)

I suggest we give 'is' and/or 'id()' a casting vote in the poll
as to what is "copied" in a plain assignment...:-).


Alex






More information about the Python-list mailing list