Index
- Alias
- Shallow copy vs Deep copy
- Shallow copy vs Deep copy (unmutable objects)
- Shallow copy vs Deep copy (mutable objects)
Alias
- The assignment operator in python:
- Doesn’t create a copy of the objects
- It makes bindings between a variable and a object
Partial example:
Shallow copy vs Deep copy
Shallow copy: Create a new object and insert references into the new object pointed at those found in the original.
Deep copy: Create a new object, and then recursively insert redundant copies of the objects found in the original.
There isn’t any difference between alice, shallow copy and deep copy of an unmutable object
Unmutable not compound object
Unmutable object compound by unmutable objects
Unmutable object compound by un mutable objects:
Mutable not compound object
Mutable object compound by unmutable objects
Mutable object compound by un mutable objects