Why does changing 1 list affect the other?

Ben Finney bignose-hates-spam at and-benfinney-does-too.id.au
Thu Nov 6 23:29:33 EST 2003


On Fri, 07 Nov 2003 04:03:27 GMT, Cy Edmunds wrote:
> Scalars do NOT automatically make a copy.

True, they can't be modified at all, so the only assignment operation
that makes sense is to assign a new value entirely.  This was obscured
in my summary of the issue.

So, yes, "mutable objects can be modified" is the better starting point.

-- 
 \         "Faith may be defined briefly as an illogical belief in the |
  `\               occurrence of the improbable."  -- Henry L. Mencken |
_o__)                                                                  |
Ben Finney <http://bignose.squidly.org/>




More information about the Python-list mailing list