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

Name: Unpickling
Definition: the inverse of pickling
Page: https://docs.python.org/3/library/pickle.html#module-pickle

Instruction: pickle.dumps(obj)
Language: Python
Returns: The pickled representation of the object as a bytes object
Variables: obj an object

Instruction: pickle.dump(obj,file)
Effect: Write a pickled representation of obj to the open file object file.
Language: Python
Variables: obj an object

Instruction: protocol=i
Effect: State which protocol to use
Language: Python
Variables: obj an object
f a pickle function

Instruction: fix_imports=True
Effect: Pickle will try to map the new Python 3 names to the old module names used in Python 2, so that the pickle data stream is readable with Python 2.
Language: Python
Context: pickle
Variables: obj an object
f a pickle function
Assuming: protocol is less than 3

Variable: pickle.HIGHEST_PROTOCOL
Meaning: The highest protocol currently available for pickle.
Language: Python

Variable: pickle.DEFAULT_PROTOCOL
Meaning: The current default protocol for pickle.
Language: Python

Instruction: pickle.load(file)
Effect: The reconstituted object hierarchy specified in the file
Language: Python
Context: Pickle
Variables: file a file object

Instruction: pickle.loads(foo)
Effect: The object encoded in the pickled object hierarchy foo
Language: Python

Variable: pickle.PickleError
Meaning: Common base class for the other pickling exceptions
Language: Python

Variable: pickle.PicklingError
Meaning: Error raised when an unpicklable object is encountered by Pickler . It inherits PickleError .
Language: Python

Variable: pickle.UnpicklingError
Meaning: Error raised when there is a problem unpickling an object, such as a data corruption or a security violation. It inherits PickleError.
Language: Python