non-pickle persistance for dicts?

Devin Jeanpierre jeanpierreda at gmail.com
Wed May 16 20:33:16 EDT 2012


On Wed, May 16, 2012 at 6:53 PM, Charles Hixson
<charleshixsn at earthlink.net> wrote:
> Thanks.  It looks like either would do what I need.  Any suggestion as to
> how to choose between them?  E.g., is AST better supported?  faster?  (I'm
> tending towards AST purely because it seems more tied to Python, but of
> course that *could* be a disadvantage, if there were more external tools for
> working with json.)

I'd pick json, because it will tell you if you try to serialize
something that can't be deserialized. repr() will just dump it, and
then you'll find out later (on load) that it wasn't serialized
properly.

repr() is not meant for storing data, it's meant for presenting it to
a programmer.

-- Devin



More information about the Python-list mailing list