When to use "deep copy"? (Doc string is over my head) #4962
-
|
Dask delayed best practices advises to not mutate functional inputs. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
|
Others can give more precise definitions but my mental model:
One way to see this is to try
|
Beta Was this translation helpful? Give feedback.
Others can give more precise definitions but my mental model:
.deepcopycopies everything that the object references. It shares nothing with the existing object..copyonly copies the container. Anything that the existing object referenced will still be referenced by the new object.One way to see this is to try
copyanddeepcopy-ing a dataset and see how these two respective operations on the copy are affected:attrsds["lat"][0] = 1