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

[Python-3000] Simplifying pickle for Py3k

2007-10-03 Thread Neil Schemenauer
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 the problem, just the fact that t

Re: [Python-3000] Last call for PEP 3137: Immutable Bytes andMutable Buffer

2007-10-03 Thread Guido van Rossum
On 10/3/07, Christian Heimes <[EMAIL PROTECTED]> wrote: > I don't have a use case yet but it sounds like a > useful addition to the new buffer() type: That's a contradiction. Without a use case it's not useful. Let's be conservative on these "kitchen sink" ideas. They belong in python-ideas anywa

Re: [Python-3000] Last call for PEP 3137: Immutable Bytes andMutable Buffer

2007-10-03 Thread Christian Heimes
Terry Reedy wrote: > | It'd be useful and more efficient if the new buffer type would support > | the bit wise operations directly: > | > | >>> orig_data &= 0x1F > | TypeError: unsupported operand type(s) for &=: 'bytes' and 'int' > > This sort of broadcast behavior seems like numpy territory to m