To pickle or not to pickle

Irmen de Jong irmen.NOSPAM at xs4all.nl
Fri May 8 13:11:03 EDT 2015


On 8-5-2015 12:32, Peter Otten wrote:
> Cecil Westerhof 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?
> 
> Let's say it the other way around: pickle is fine for short term storage 
> when the generation of the file is under your control and you only need to 
> access it from Python. 

The latter is not really a restriction, if you want to use it from Java or .NET.
https://github.com/irmen/Pyrolite  provides an (un)pickler for these platforms.


-irmen




More information about the Python-list mailing list