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?
_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless