Global Interpreter Lock
-
This is a mutex used for limiting access to python objects and helps thread synchronization by avoiding deadlocks.
GIL achieves
multitasking (and not parallel computing)
Memory Management
-
Memory management in Python is done by Python Memory Manager. The memory allocated in private heap space.
All objects are stored in private heap & inaccessible to programmer.
Python has an in-built garbage collection to recycle the unused memory for the private heap space.
PEP 8 (Python Enhancement Proposal)
-
PEP is an official document providing information about new feature coming in python.
Pickling = Serialization / Unpickling
-
Serializing an object refers to transforming it into a format that can be stored(json), so as to be able to deserialize it,
later on, to obtain the original object. Serialization is called Pickling in python(because pickle module is used to do it)
Pickling?
Any object in Python can be serialized into a byte stream and dumped as a file in the memory. pickle.dump()
Unpickling? Inverse of pickling. Deserialize the byte stream to recreate the objects stored in the file and loads the object to memory. pickle.load()