Re: [Python-Dev] Pickle implementation questions

2006-06-30 Thread Tim Peters
[Tim Peters] >> I hope you've read PEP 307: [Bruce Christensen] > I have. Thanks to you and Guido for writing it! It's been a huge help. You're welcome -- although we were paid for that, so thanks aren't needed ;-) >> The implementation is more like: >> [snip] > Thanks! That helps a lot. PEP 30

Re: [Python-Dev] Pickle implementation questions

2006-06-30 Thread Martin v. Löwis
Bruce Christensen wrote: > Thanks! That helps a lot. PEP 307 and the pickle module docs describe the end > result pretty well, but they don't always make it clear where things are > implemented. I'm trying to make sure that I'm getting the right interaction > between object.__reduce(_ex)__, pickle,

Re: [Python-Dev] Pickle implementation questions

2006-06-30 Thread Bruce Christensen
Tim Peters wrote: > I hope you've read PEP 307: I have. Thanks to you and Guido for writing it! It's been a huge help. > The implementation is more like: [snip] Thanks! That helps a lot. PEP 307 and the pickle module docs describe the end result pretty well, but they don't always make it clear

Re: [Python-Dev] Pickle implementation questions

2006-06-30 Thread Tim Peters
[Bruce Christensen] > So just to be clear, is it something like this? I hope you've read PEP 307: http://www.python.org/dev/peps/pep-0307/ That's where __reduce_ex__ was introduced (along with all the rest of pickle protocol 2). > class object: > def __reduce__(self): > return c

Re: [Python-Dev] Pickle implementation questions

2006-06-30 Thread Neal Norwitz
Please do help us improve the docs. Patches are the best (most likely to be applied the fastest), bug reports are welcome too. Especially when they contain your preferred wording in the text. n -- On 6/30/06, Bruce Christensen <[EMAIL PROTECTED]> wrote: > Fredrik Lundh wrote: > > on the other h

Re: [Python-Dev] Pickle implementation questions

2006-06-30 Thread Bruce Christensen
Fredrik Lundh wrote: > on the other hand, it would be nice if someone actually used Bruce's questions > and the clarifications to update the documentation; the ideas behind the > internal pickle interfaces aren't exactly obvious, even if you have the > source. I've found a few other places where t

Re: [Python-Dev] Pickle implementation questions

2006-06-30 Thread Bruce Christensen
Thanks for your responses, Martin! Martin v. Löwis wrote: > Bruce Christensen wrote: > > - Where are object.__reduce__ and object.__reduce_ex__ defined, and how > > does copy_reg._reduce_ex fit into the picture? > > See > > http://docs.python.org/lib/node69.html So just to be clear, is it som

Re: [Python-Dev] Pickle implementation questions

2006-06-30 Thread Fredrik Lundh
Martin v. Löwis wrote: >> In developing a cPickle module for IronPython that's as compatible as >> possible with CPython, these questions have come up: > > [I wish you were allowed to read the source code of Python] on the other hand, it would be nice if someone actually used Bruce's questions an

Re: [Python-Dev] Pickle implementation questions

2006-06-29 Thread Martin v. Löwis
Bruce Christensen wrote: > In developing a cPickle module for IronPython that's as compatible as > possible with CPython, these questions have come up: [I wish you were allowed to read the source code of Python] > - Where are object.__reduce__ and object.__reduce_ex__ defined, and how > does co

[Python-Dev] Pickle implementation questions

2006-06-29 Thread Bruce Christensen
In developing a cPickle module for IronPython that's as compatible as possible with CPython, these questions have come up: - Where are object.__reduce__ and object.__reduce_ex__ defined, and how does copy_reg._reduce_ex fit into the picture? PEP 307 states that the default __reduce__ implementat