[Python-ideas] copyable generators

Kay Schluehr kay at fiber-space.de
Sun Apr 5 08:20:17 CEST 2009

Dear Python idea-lists,

I've noticed that subgenerators, coroutines and such stuff are heavily 
discussed and are on topic here right now. What I'd like to ask is about 
the mood of re-considering the deferred PEP 323 about copyable iterators 
and related ideas.

I've done some work a while ago about copyable and pickable generators 
in pure Python that works in some limitations but basically relies on a 
fierce and almost impenetrable ( although documented ) bytecode hack. It 
is bundled in a package called generator_tools. The design is mostly 
"test-driven" which means that I wouldn't dare in my life to try a more 
formal specification of the used heuristics and special case treatments.


I know that this packages has users and there were also quite a few 
contributors who provided bug reports and fixes. So it isn't an academic 
exercise. I would love to see this package being abandoned in the future 
and replaced by a proper, more complete and faster CPython 
implementation. I know I'm not really in a position of calling for 
volunteers in particular because I'm not a core developer and don't want 
to hack the CPython C code base. But maybe this would be a cool idea for 
a summer-of-code project or something alike. I know that Stackless 
Python has a working implemenation so it shall be at least feasible.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20090405/3d41dbef/attachment.html>

More information about the Python-ideas mailing list