To pickle or not to pickle

Cem Karan cfkaran2 at gmail.com
Fri May 8 06:27:30 EDT 2015


What are you using pickle for?  If this is just for yourself, go for it.  If you're planning on interchanging with different languages/platforms/etc., JSON or XML might be better.  If you're after something that is smaller and faster, maybe MessagePack or Google Protocol Buffers.  If you're after something that can hold a planet's worth of data, maybe HDF5.  It really depends on your use-case.

MessagePack - http://en.wikipedia.org/wiki/MessagePack
Google Protocol Buffers - http://en.wikipedia.org/wiki/Protocol_Buffers
HDF5 - http://en.wikipedia.org/wiki/Hierarchical_Data_Format

Thanks,
Cem Karan

On May 8, 2015, at 5:58 AM, Cecil Westerhof <Cecil at decebal.nl> wrote:

> I first used marshal in my filebasedMessages module. Then I read that
> you should not use it, because it changes per Python version and it
> was better to use pickle. So I did that and now I find:
>    https://wiki.python.org/moin/Pickle
> 
> Is it really that bad and should I change again?
> 
> -- 
> Cecil Westerhof
> Senior Software Engineer
> LinkedIn: http://www.linkedin.com/in/cecilwesterhof
> -- 
> https://mail.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list