Serializing Python Objects

  • Mark Pilgrim


The concept of serialization is simple. You have a data structure in memory that you want to save, reuse, or send to someone else. How can you do that? Well, that depends on how you want to save it, how you want to reuse it, and to whom you want to send it. Many games allow you to save your progress when you quit the game and pick up where you left off when you relaunch the game. (Actually, many non-gaming applications do this as well.) In this case, a data structure that captures “your progress so far” needs to be stored on disk when you quit and then loaded from disk when you relaunch. The data is meant to be used only by the same program that created it, never sent over a network, and never read by anything other than the program that created it. Therefore, the interoperability issues are limited to ensuring that later versions of the program can read data written by earlier versions.


Conversion Function Binary Mode Protocol Version Entry Variable Interoperability Issue 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Mark Pilgrim 2009

Authors and Affiliations

  • Mark Pilgrim

There are no affiliations available

Personalised recommendations