[OT] Simulation Results Managment

Dieter Maurer dieter at handshake.de
Sun Jul 15 02:35:10 EDT 2012


moogyd at yahoo.co.uk writes:
> ...
> Does pickle have any advantages over json/yaml?

It can store and retrieve almost any Python object with almost no effort.

Up to you whether you see it as an advantage to be able to store
objects rather than (almost) pure data with a rather limited type set.


Of course, "pickle" is a proprietary Python format. Not so easy to
decode it with something else than Python. In addition, when
you store objects, the retrieving application must know the classes
of those objects -- and its knowledge should not be too different
from how those classes looked when the objects have been stored.


I like very much to work with objects (rather than with pure data).
Therefore, I use "pickle" when I know that the storing and retrieving
applications all use Python. I use pure (and restricted) data formats
when non Python applications come into play.




More information about the Python-list mailing list