Jan-06-2019, 04:46 PM
(Jan-06-2019, 04:39 PM)ichabod801 Wrote:I think they think all copies are deep copies?(Jan-06-2019, 04:24 PM)python_user_n Wrote: Where I disagree is in the case you transfer this object (a tuple) somewhere you can't just transfer the integer and reference.What do you mean by transfer?
@python_user_n - that's not the case. Given a tuple containing a list, copying the tuple does not require making a copy of the list. This can be verified empirically by creating the tuple containing the list, copying the tuple, modifying the list via one of the tuples, then observing through the other tuple that that list changed as well.