hii readers,
This is our introduction part of python pickle module tutorials series. In this tutorials, series i am going to show you how to use python pickle module. and what are their usages. etc etc.
so, let's start from some basic knowledge.
our first question is
Q 1. what is python pickle module?
Ans. As Python Official Website :
" python pickle module implements a fundamental, but
powerful algorithm for serializing and de-serializing a Python object structure. “Pickling” is
the process whereby a Python object hierarchy is converted into a byte stream, and
“unpickling” is the inverse operation, whereby a byte stream is converted back into an
object hierarchy. Pickling (and unpickling) is alternatively known as “serialization”,
“marshalling,” or “flattening”, however, to avoid confusion, the terms used here are
“pickling” and “unpickling”."
In simple words,
with pickle module we can easily converts a list/dict/function/class and other python
objects structure into binary strings. This process is called "pickling". and doing this
process in reverse order is called "unpickling".
Now, Our second Question Is
Q 2. What Is python cPickle module?
Ans. cPickle Python Module Is Completely Works Like pickle module but their is only one
main difference. that is cPickle written in C Programming languages where pickle is written
in pure python.
Q 3. difference between pickle and cPickle?
Ans. cPickle written in C Programming languages where pickle is written in pure python
that's why cPickle is nearly about 1000 times faster than pickle module. But cPickle does
not support subclassing of the Pickler()
and Unpickler()
classes, because
in cPickle
these are functions, not classes. Most applications have no need for this
functionality, and can benefit from the improved performance of cPickle
.
For More Information Related To pickle and cPickle.
I think, this is enough for introduction part.
So, stay tunned with us.
Thanks For Reading.
For More Update, Visit Our Blog Regularly.
, Subscribe Our Blog,
Follow Us and share it.
For Any Type of Suggestion, Help Or Question
Contact me:
Suraj
surajsinghbisht054@gmail.com
or Comment Below