Is there any difference between Pickling and Serialization?

Ajay Gupta

I have came across these two terms so often while reading about python objects. However, there is a confusion between pickling and serialization since at one place I read

The pickle module implements an algorithm for turning an arbitrary Python object into a series of bytes. This process is also called serializing” the object.

If serializing and pickling is same process, why use different terms for them?

Martijn Pieters

You are misreading the article. Pickling and serialisation are not synonymous, nor does the text claim them to be.

Paraphrasing slighly, the text says this:

This module implements an algorithm for turning an object into a series of bytes. This process is also called serializing the object.

I removed the module name, pickle, deliberately. The module implements a process, an algorithm, and that process is commonly known as serialisation.

There are other implementations of that process. You could use JSON or XML to serialise data to text. There is also the marshal module. Other languages have other serialization formats; the R language has one, so does Java. Etc.

See the WikiPedia article on the subject:

In computer science, in the context of data storage, serialization is the process of translating data structures or object state into a format that can be stored (for example, in a file or memory buffer, or transmitted across a network connection link) and reconstructed later in the same or another computer environment.

Python picked the name pickle because it modelled the process on how this was handled in Modula-3, where it was also called pickling. See Pickles: Why are they called that?

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Python Multiprocessing, Difference between Process and Pool, Pickling of Data

From Dev

Python Multiprocessing, Difference between Process and Pool, Pickling of Data

From Dev

What is the difference between Spark Serialization and Java Serialization?

From Java

What is the difference between Serialization and Marshaling?

From Dev

Is there any difference between $@ and "$@"?

From Dev

Difference (if there is any) between ` and ' in javascript

From Dev

Is there any difference between vbNullString and ""?

From Dev

is there any difference between the queries

From Dev

Java Serialization to transfer data between any language

From Dev

Java Serialization to transfer data between any language

From Dev

Is there are difference between RMI and plain object serialization?

From Dev

Difference between serialization and normal object storage?

From Dev

What is difference between default and custom serialization?

From Dev

Is there any difference between QRegularExpression and QRegExp?

From Dev

Is there any difference between these two loops?

From Java

Difference between "*" and "Any" in Kotlin generics

From Java

Is there any difference between a GUID and a UUID?

From Dev

Is there any difference between type and class?

From Dev

Is there any difference between `*x` and `x*`?

From Dev

Is there any difference between Activityname.this() & this?

From Dev

Is there any technical difference between these methods?

From Dev

Is there any difference between sql linq

From Dev

Difference between Future[Any] and Future[_]

From Dev

Any difference between '+' and '&' for String concatenation?

From Dev

What is the difference between `mixed` and `any`?

From Dev

Is there any difference between these two loops?

From Dev

There is any difference between this zone syntax?

From Dev

Is there any difference between both of these codes?

From Dev

Is there any difference between the two codes?

Related Related

  1. 1

    Python Multiprocessing, Difference between Process and Pool, Pickling of Data

  2. 2

    Python Multiprocessing, Difference between Process and Pool, Pickling of Data

  3. 3

    What is the difference between Spark Serialization and Java Serialization?

  4. 4

    What is the difference between Serialization and Marshaling?

  5. 5

    Is there any difference between $@ and "$@"?

  6. 6

    Difference (if there is any) between ` and ' in javascript

  7. 7

    Is there any difference between vbNullString and ""?

  8. 8

    is there any difference between the queries

  9. 9

    Java Serialization to transfer data between any language

  10. 10

    Java Serialization to transfer data between any language

  11. 11

    Is there are difference between RMI and plain object serialization?

  12. 12

    Difference between serialization and normal object storage?

  13. 13

    What is difference between default and custom serialization?

  14. 14

    Is there any difference between QRegularExpression and QRegExp?

  15. 15

    Is there any difference between these two loops?

  16. 16

    Difference between "*" and "Any" in Kotlin generics

  17. 17

    Is there any difference between a GUID and a UUID?

  18. 18

    Is there any difference between type and class?

  19. 19

    Is there any difference between `*x` and `x*`?

  20. 20

    Is there any difference between Activityname.this() & this?

  21. 21

    Is there any technical difference between these methods?

  22. 22

    Is there any difference between sql linq

  23. 23

    Difference between Future[Any] and Future[_]

  24. 24

    Any difference between '+' and '&' for String concatenation?

  25. 25

    What is the difference between `mixed` and `any`?

  26. 26

    Is there any difference between these two loops?

  27. 27

    There is any difference between this zone syntax?

  28. 28

    Is there any difference between both of these codes?

  29. 29

    Is there any difference between the two codes?

HotTag

Archive