Re: [Python-3000] Simplifying pickle for Py3k

2007-10-05 Thread Alexandre Vassalotti
On 10/5/07, Neil Schemenauer <[EMAIL PROTECTED]> wrote: > On Thu, Oct 04, 2007 at 02:49:16AM -0400, Alexandre Vassalotti wrote: > > Could you elaborate on what you are trying to do? > > I'm trying to efficiently pickle a 'unicode' subclass. I'm > disappointed that it's not possible to be as effici

Re: [Python-3000] Simplifying pickle for Py3k

2007-10-04 Thread Neil Schemenauer
On Thu, Oct 04, 2007 at 02:49:16AM -0400, Alexandre Vassalotti wrote: > Could you elaborate on what you are trying to do? I'm trying to efficiently pickle a 'unicode' subclass. I'm disappointed that it's not possible to be as efficient as the built-in unicode class, even when using an extension c

Re: [Python-3000] Simplifying pickle for Py3k

2007-10-03 Thread Alexandre Vassalotti
On 10/3/07, Neil Schemenauer <[EMAIL PROTECTED]> wrote: > I guess the library overhaul hasn't really started it but it would > be nice if the pickle module could get some work. Today I'm trying > to efficiently store a class using pickle Could you elaborate on what you are trying to do? > and th

Re: [Python-3000] Simplifying pickle for Py3k

2007-10-03 Thread Greg Ewing
[EMAIL PROTECTED] wrote: > I've been going through that (painful) exercise the past couple of > days as I try and figure out what methods my to-be-pickled objects need to > implement. __reduce__, __reduce_ex__, __getstate__, __setstate__, copy_reg, > __safe_for_unpickling__, __getnewargs__. Your

Re: [Python-3000] Simplifying pickle for Py3k

2007-10-03 Thread Christian Heimes
Neil Schemenauer wrote: > I guess there are several different solutions: > > * Remove backwards compatible stuff from the code and the > documentation. The downside is that old pickles could not be > loaded. Perhaps that's not a huge issue since the removal of > old-style c

Re: [Python-3000] Simplifying pickle for Py3k

2007-10-03 Thread skip
Georg> I don't envy everyone reading the pickle docs trying to Georg> understand which method exactly he has to implement, which is Georg> going to be called with what arguments, etc. Agreed. I've been going through that (painful) exercise the past couple of days as I try and figure

Re: [Python-3000] Simplifying pickle for Py3k

2007-10-03 Thread Georg Brandl
Neil Schemenauer schrieb: > I guess the library overhaul hasn't really started it but it would > be nice if the pickle module could get some work. Today I'm trying > to efficiently store a class using pickle and the documentation is > making my head hurt. I don't think the documentation itself is

Re: [Python-3000] Simplifying pickle for Py3k

2007-10-03 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Oct 3, 2007, at 2:01 PM, Neil Schemenauer wrote: > I guess the library overhaul hasn't really started it but it would > be nice if the pickle module could get some work. Today I'm trying > to efficiently store a class using pickle and the document

Re: [Python-3000] Simplifying pickle for Py3k

2007-10-03 Thread Guido van Rossum
I think it's essential to be able to *read* pickles generated by older Python versions. But for writing I'm okay with only writing protocol 2 (which Python 2.x also understands) and only supporting the modern APIs for customizing pickle writing. I don't think classic class instances are necessaril