marshal vs pickle
usenet-mail-0306.20.chr0n0ss at spamgourmet.com
Wed Oct 31 14:25:00 CET 2007
Evan Klitzke wrote:
> Can anyone elaborate more on the difference between marshal and
> pickle. In what conditions would using marshal be unsafe? If one
> can guarantee that the marshalled objects would be created and
> read by the same version of Python, is that enough?
Just use pickle. From the docs:
| The marshal module exists mainly to support reading and writing
| the ``pseudo-compiled'' code for Python modules of .pyc files.
| Therefore, the Python maintainers reserve the right to modify the
| marshal format in backward incompatible ways should the need
| arise. If you're serializing and de-serializing Python objects,
| use the pickle module instead.
BOFH excuse #421:
Domain controller not responding
More information about the Python-list