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

Patrick K. O'Brien pobrien@orbtech.com
Thu, 19 Sep 2002 15:01:08 -0500


[Guido van Rossum]
>
> Sorry, I may have missed that suggestion amidst your rhetoric.
>
> Assuming you're lobbying for a builtin named copy(), should it be a
> deep copy or a shallow copy?

Is this question a red herring, Guido? Surely one would ask for both copy()
and deepcopy(), the same functions exposed by the copy module. Of course,
I'm not convinced having them as builtins solves the real problem. (Which is
why I asked if the question was a red herring.) If anything, having these
functions as builtins might lead to an excessive use of copying by the same
individuals who hadn't yet gotten a handle on mutable versus immutable
objects.

Pat

--
Patrick K. O'Brien
Orbtech
-----------------------------------------------
"Your source for Python programming expertise."
-----------------------------------------------
Web:  http://www.orbtech.com/web/pobrien/
Blog: http://www.orbtech.com/blog/pobrien/
Wiki: http://www.orbtech.com/wiki/PatrickOBrien
-----------------------------------------------