Re: marshal vs pickle
- From: Bjoern Schliessmann <usenet-mail-0306.20.chr0n0ss@xxxxxxxxxxxxxxx>
- Date: Wed, 31 Oct 2007 14:25:00 +0100
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.
Regards,
Björn
--
BOFH excuse #421:
Domain controller not responding
.
- References:
- marshal vs pickle
- From: Evan Klitzke
- marshal vs pickle
- Prev by Date: Re: py2exe (or other exe builder) on Vista system for Vista/XP install targets.
- Next by Date: shouldn't 'string'.find('ugh') return 0, not -1 ?
- Previous by thread: marshal vs pickle
- Next by thread: Re: marshal vs pickle
- Index(es):
Relevant Pages
|