To pickle or not to pickle

Cecil Westerhof Cecil at decebal.nl
Fri May 8 12:43:44 EDT 2015


Op Friday 8 May 2015 17:11 CEST schreef Chris Angelico:

> On Sat, May 9, 2015 at 12:34 AM, Cecil Westerhof <Cecil at decebal.nl> wrote:
>> When I unpickle quotes.pickle I get:
>> [25, 112, 4, 18, 41, 2, 81, 75, 28, 60, 105, 47, 84, 65, 103, 42,
>> 13, 66, 55, 124, 6, 82, 76, 12, 61, 113, 119, 96, 3, 68, 11, 89,
>> 98, 107, 118, 29, 57, 33, 88, 121, 110, 49, 90, 72, 87, 114, 43,
>> 59, 8, 92]
>>
>> Very simple indeed.
>
> In that case, I'd probably write it out as JSON, or as a simple
> whitespace-separated list of numbers. That way, if anything goes
> wrong, you can open up the file and look at it easily.

Done. And the files are even smaller. ;-)

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof



More information about the Python-list mailing list