Hi Wen,

On 09.09.14 18:58, Wen Tao wrote:
> I was able to pickle a generator in the stackless python 2.7 version,
> the code I use is:
>
> def process():
> yield 0
> yield 1
>
> gen = process()
> print(gen.send(None))
> import pickle
> print(pickle.dumps(gen))
>
> But in the stackless python 3.3 version (which I downloaded source
> code and compiled in a Ubuntu 12.04 amd64 box), the code can not run.
> The error message read was:
>
> 0
> Traceback (most recent call last):
>   File "test.py", line 8, in <module>
>     print(pickle.dumps(gen))
> _pickle.PicklingError: Can't pickle <class 'generator'>: attribute
> lookup builtins.generator failed
>
> Is this a feature? Or deserve a bug fix?
>

This does of course deserve a bug fix.
Looking into that ...

cheers - Chris

-- 
Christian Tismer             :^)   [email protected]
Software Consulting          :     http://www.stackless.com/
Karl-Liebknecht-Str. 121     :     http://www.pydica.net/
14482 Potsdam                :     GPG key -> 0xFB7BEE0E
phone +49 173 24 18 776  fax +49 (30) 700143-0023

_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless

Reply via email to