[Python-3000] [Python-Dev] inst_persistent_id

Alexandre Vassalotti alexandre at peadrop.com
Mon Jan 21 04:39:15 CET 2008

On Jan 20, 2008 4:14 PM, Jim Fulton <jim at zope.com> wrote:
> On Jan 12, 2008, at 7:33 PM, Alexandre Vassalotti wrote:
> > By the way, you might be interested to look at my work on pickle [1]
> > for Python 3K. As part of last year Summer of Code, I removed the
> > differences between the Python and C implementation of pickle, and
> > thus allowing the C version to be transparently used, instead of the
> > Python one, when it is available.
> Interesting. Does that mean that cPickle can be extended through
> inheritance?

Well, Pickler and Unpickler can be subclassed. I am not sure they can
be really "extended," since, unlike the Python version, the C version
of Pickler and Unpickler only exposes a minimal API.

> > Currently, I am polishing the code
> > for inclusion into the main branch.
> Are you doing any benchmarking?


> (I'm worried by the performance impact of allowing extending through
> inheritance. :)

Well, I haven't changed cPickle much to make it subclassable. So, the
impact is minimal. Currently, the only performance change is due the
removal of the special-cases for PyFile and cStringIO "buffers."

> > I also started to work on the next
> > version of the pickle protocol, that will make it more suitable for
> > Python 3K. If you are interested to help out, just send me an email
> > and I will explain you what needs to be done.
> I'm interested, but I don't think I have time. :(

I am short of time, too. :-)

-- Alexandre

More information about the Python-3000 mailing list