On Sat, Apr 18, 2015 at 11:08 PM, Cameron Simpson <c...@zip.com.au> wrote:

> Sometimes you want a "deep" copy, where "b" would have got a copy of the
> iriginal x-y list. See the "copy" module's "deepcopy" function, which
> supplies this for when it is needed:
>
>  https://docs.python.org/3/library/copy.html#copy.deepcopy

In this reference, part of it states:

"Two problems often exist with deep copy operations that don’t exist
with shallow copy operations:

Recursive objects (compound objects that, directly or indirectly,
contain a reference to themselves) may cause a recursive loop.
Because deep copy copies everything it may copy too much, e.g.,
administrative data structures that should be shared even between
copies."

If I am understanding things correctly, should not that last sentence
read instead:

"...structures that should *not* be shared even between copies." ???

-- 
boB
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to