[Tutor] Copying [was Re: What's in a name?]
spir
denis.spir at gmail.com
Sat Jan 4 12:10:49 CET 2014
On 01/04/2014 07:24 AM, Keith Winston wrote:
> I had heard about deep/shallow copies, though in
> this particular example (all int dicts), I don't think there's a
> difference...?
There's none, you're right. It's only whenever inner items (fields, etc...)
themselves are complex elements and mutable. Else, mutations on original items
would show on copies, and conversely. But when htere are simple items only, or
immutable (tuples, strings...) the ambiguity does not exist.
Denis
More information about the Tutor
mailing list