[Python-Dev] Pickle alternative in stdlib (Was: On breaking modules into packages) (original) (raw)
Jesus Cea jcea at jcea.es
Fri Nov 5 02:31:05 CET 2010
- Previous message: [Python-Dev] Pickle alternative in stdlib (Was: On breaking modules into packages)
- Next message: [Python-Dev] Help with warnings not being raised
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
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 future.
http://docs.python.org/library/marshal.html
""" 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/
iQCVAwUBTNNeWZlgi5GaxT1NAQLU/wP/aZOJkgYWHyYMUT0diDsh+pFg6TxDPWMu /cNx5l6wNaW8DQ5cuMSHkelfVYpx6EQwTCZPu9jiAAOJmFfNURt1Q+P4ikf5eobA 7mRlFrr+C3Lmi9CA3thuwBh4IkLHUl3mk6eQ0mqJPzpdbJLWhPmkOEN7L31nk9// YQHdU4e795U= =+cB0 -----END PGP SIGNATURE-----
- Previous message: [Python-Dev] Pickle alternative in stdlib (Was: On breaking modules into packages)
- Next message: [Python-Dev] Help with warnings not being raised
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]