[Python-Dev] Pickle alternative in stdlib (Was: On breaking modules into packages)
jcea at jcea.es
Fri Nov 5 02:31:05 CET 2010
-----BEGIN PGP SIGNED MESSAGE-----
On 04/11/10 15:57, Alexander Belopolsky wrote:
> On Thu, Nov 4, 2010 at 10:51 AM, Guido van Rossum <guido at python.org> wrote:
>>>> Twisted actually tried to preserve pickle compatibility in the bad old days,
>>>> but it was impossible. Pickles should never really be saved to disk unless
>>>> they contain nothing but lists, ints, strings, and dicts.
>> But *that* set of types can safely be marshalled using the marshal module...
> Not if the instances contain reference cycles.
Moreover, in the docs the marshall module EXPLICITLY says that the
format is undocumented on purpose, and subject to change. Seems a pretty
bad option for persistence, if you expect to read your data back in the
This module contains functions that can read and write Python values in
a binary format. The format is specific to Python, but independent of
machine architecture issues (e.g., you can write a Python value to a
file on a PC, transport the file to a Sun, and read it back there).
Details of the format are undocumented on purpose; it may change between
Python versions (although it rarely does).
Jesus Cea Avion _/_/ _/_/_/ _/_/_/
jcea at jcea.es - http://www.jcea.es/ _/_/ _/_/ _/_/ _/_/ _/_/
jabber / xmpp:jcea at jabber.org _/_/ _/_/ _/_/_/_/_/
. _/_/ _/_/ _/_/ _/_/ _/_/
"Things are not so easy" _/_/ _/_/ _/_/ _/_/ _/_/ _/_/
"My name is Dump, Core Dump" _/_/_/ _/_/_/ _/_/ _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
More information about the Python-Dev