Pickle is a module for persistence (or serialization) to hold the Python object in Python. Currently Pickle only provides text files or binary files on the disk. If you need to generate an XML file, you can use XML_PICKLE and XML_Objectify, which will be analyzed in later articles. But Pickle does not resolve naming and finding a Pickle file, and cannot support and access persistence objects. Such a demand can be implemented by ZODB (underlying database of Zope). The entire Pickle use is very simple, and the interface class provides only the Pickler and Unpickler, the function has Dump (Object, File), Dumps (Object) string, load (file), Loads (String), at http: // www -900 .ibm.com / developerWorks / CN / Linux / L-pypers / index.shtml articles have a detailed instructions. Compared with the C serialization function library, Pickle is very simple in writing from the use or the library itself. The following is a contrast below the new Serialization in Boost 1.32.0 (which is better than the serialization capability provided by MFC and Common C ). Of course, I just make a comparison in the function, not to say that Python is better than C , after all, the other is not the same. The SERIALZATION proposed that 9 standards used to deliver the extent to serialization support, and of course the 9 criteria are implemented in Serialzation. How is Pickle? 1, code portability. Python has its own standard organization, and the implementation of the Python interpreter is also unique, unlike C has many compilers. Moreover, Pickle also considers forward compatibility of the code when updating. 2, code practicability. Python's object-oriented than C is much stronger, Attribute contains a lot of object information, and the information in the generated serialization file is much more than C . 3. Support for different versions of data structure. The Pickle can do with Serialization, all of which are implemented by some hook functions provided by the function library. 4, save and load the pointer object. Python has no pointer. 5, sharing data support. Pickle is implemented in Pickler and Unpickler. 6. Support for STL containers. The container type Turple, List, and DICT feature provided by Python itself are very powerful, which is the STL cannot match. Pickle provides support for these built-in containers. 7, generate data portability. The truth and 1 are almost. 8. Serialization method and document save the independence of the load. Python transforms all SWIO to the I / O mode through the StringIO class class, so it is independent. 9. Transparency and friendship of serialization methods. The Pickle can provide far-strong serialization. Go back and then look at the implementation of the source code. Like other Boost libraries, Boost Serialization is based on Boost MPL and Boost Preprocessor, through very complex GP programming. Give me the feeling, debugging using Boost's procedure is very tired, complex Template and Type derived, making it difficult to clear the algorithm. In contrast, Pickle is used for Python's object-oriented, providing a lot of type information at runtime, with some simple recursive and dispatcher, you can serialize large part of the Python object (file object is not available).