[Edu-sig] Fw: Python sequences by reference - how to make clear

Guido van Rossum guido@python.org
Fri, 20 Sep 2002 08:51:53 -0400


> I would assume that copy() would be a deepcopy by default (as that
> would be what new users would assume). So, that might suggest a
> shallowcopy() method too.

Deep copying is not very useful, as it usually copies way too much.
If you focus all your examples on multi-dimensional arrays, yes, then
you'd need deep copying to be the default.  But I think that is a
narrow-minded view on learning to program, based in the state of the
art in the early '60s (when arrays were the only data structuring
methodology available in programming languages).

--Guido van Rossum (home page: http://www.python.org/~guido/)