Title: Theory / Unimportant / CS / Programming / Python / Lib / copy 8.10
Tags: FromInstruction computer_to_instruction hasNotNewEffectReturnsMeaning some_instruction
On every note of this deck, unless a note says otherwise:
Page: https://docs.python.org/3/library/copy.html

Name: A shallow copy
Definition: A copy of a compound object such that the new object contains reference to the same elements than the previous object

Name: A deep copy
Definition: A recursive copy of a compound object

Name: Pickling
Definition: the process whereby a Python object hierarchy is converted into a byte stream
Page: https://docs.python.org/3/library/pickle.html#module-pickle
Name2: serialization
Name3: marshalling
Name4: flattening

Instruction: copy.copy(x)
Effect: A shallow copy of x
Language: Python
Variables: x an object

Instruction: copy.deepcopy(x)
Effect: A deep copy of x
Language: Python
Variables: x an object

Instruction: copy.error
Effect: The exception related to the copy module
Language: Python
Variables: x an object

Instruction: __copy__()
Language: Python
Returns: a shallow copy of the current object. Used by copy module.

Instruction: __deepcopy__()
Language: Python
Returns: a deep copy of the current object
Intuition: Used by copy module.