[Stackless] Problem with Count Objects (itertools) and pickle?

Kristján Valur Jónsson kristjan at ccpgames.com
Tue Nov 3 10:24:51 CET 2009


I've been planning to pitch the idea to C python people that iterators be made picklable in vanilla python.
It seems like a perfectly reasonable extension to the language, and I'm sure the stackless python people would be willing to share some of the experience from stackless to make it happen.
The tricky part, which stackless has done, is to make generators picklable.
K

> -----Original Message-----
> From: stackless-bounces at stackless.com [mailto:stackless-
> bounces at stackless.com] On Behalf Of Richard Tew
> Sent: 3. nóvember 2009 05:49
> To: Andrew Dalke
> Cc: Andrew Francis; stackless at stackless.com
> Subject: Re: [Stackless] Problem with Count Objects (itertools) and
> pickle?
> 
> On Mon, Nov 2, 2009 at 3:02 PM, Andrew Dalke
> <dalke at dalkescientific.com> wrote:
> > On Nov 2, 2009, at 2:46 AM, Andrew Francis wrote:
> >> TypeError: can't pickle count objects
> >
> > Indeed! That was a bad suggestion of mine. itertools.count iterators
> (like
> > many other types in Python) do not support pickling.
> ...
> >> Is this meant to so?
> >
> > I checked the source. count does not implement the pickling protocol.
> 
> Stackless should include pickling support for count, along with any
> other similar functionality.
> 
> Anyone care to work on and provide a patch?
> 
> Cheers,
> Richard.
> 
> _______________________________________________
> Stackless mailing list
> Stackless at stackless.com
> http://www.stackless.com/mailman/listinfo/stackless





More information about the Stackless mailing list