Re: To pickle or not to pickle

2015-05-08 Thread Irmen de Jong
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

Re: To pickle or not to pickle

2015-05-08 Thread Cecil Westerhof
Op Friday 8 May 2015 17:11 CEST schreef Chris Angelico: > On Sat, May 9, 2015 at 12:34 AM, Cecil Westerhof 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,

Re: To pickle or not to pickle

2015-05-08 Thread Chris Angelico
On Sat, May 9, 2015 at 12:34 AM, Cecil Westerhof 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

Re: To pickle or not to pickle

2015-05-08 Thread Cecil Westerhof
Op Friday 8 May 2015 14:53 CEST schreef Chris Angelico: > On Fri, May 8, 2015 at 9:55 PM, Cecil Westerhof wrote: >> Op Friday 8 May 2015 12:54 CEST schreef Steven D'Aprano: >> >>> If your code is only going to be used by yourself, I'd just use >>> pickle. If you are creating an application for ot

Re: To pickle or not to pickle

2015-05-08 Thread Chris Angelico
On Fri, May 8, 2015 at 9:55 PM, Cecil Westerhof wrote: > Op Friday 8 May 2015 12:54 CEST schreef Steven D'Aprano: > >> If your code is only going to be used by yourself, I'd just use >> pickle. If you are creating an application for others to use, I >> would spend the extra effort to build in supp

Re: To pickle or not to pickle

2015-05-08 Thread Cecil Westerhof
Op Friday 8 May 2015 12:54 CEST schreef Steven D'Aprano: > If your code is only going to be used by yourself, I'd just use > pickle. If you are creating an application for others to use, I > would spend the extra effort to build in support for at least > pickle, JSON and plists, and let the user d

Re: To pickle or not to pickle

2015-05-08 Thread Cecil Westerhof
Op Friday 8 May 2015 12:32 CEST schreef Peter Otten: > 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

Re: To pickle or not to pickle

2015-05-08 Thread Cem Karan
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 afte

Re: To pickle or not to pickle

2015-05-08 Thread Steven D'Aprano
On Fri, 8 May 2015 07:58 pm, 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 > >

Re: To pickle or not to pickle

2015-05-08 Thread Peter Otten
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 sh

To pickle or not to pickle

2015-05-08 Thread Cecil Westerhof
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 West