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

Guido van Rossum guido@python.org
Thu, 19 Sep 2002 16:50:56 -0400


> > > > > > Assuming you're lobbying for a builtin named copy(),
> > > > > > should it be a deep copy or a shallow copy?
> >
> > Arthur, can you please answer this?
> >
> Would it shock you to know that I don't have the understanding to
> try to answer that beyond saying the functionality of [:] slicing as
> to a list is the common use case - for folks like I.

That's a shallow copy.

(There aren't any folks like you, Arthur. :-)

Can you answer my *other* suggestion, give a programming example that
would be better if copy() were a builtin?

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