Why does changing 1 list affect the other?
bignose-hates-spam at and-benfinney-does-too.id.au
Fri Nov 7 05:29:33 CET 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 |
Ben Finney <http://bignose.squidly.org/>
More information about the Python-list