[Python-ideas] CPS transform for Python
Sam Rushing
sam-pydeas at rushing.nightmare.com
Sat Nov 10 04:06:44 CET 2012
The discussion last week with Greg Ewing got me to thinking about the
CPS transform, and how it might be a useful technique for
callback/event-driven code like asyncore & Twisted. I'm pretty sure
when I first thought about this eons ago it was before Python had
closures. They definitely make it a bit easier!
I put some simple demo code together, I think it demonstrates that the
idea is feasible, I'm curious to know if anyone is interested.
Don't get hung up on the poor quality of the generated code, big
improvements could be made with a little bit of work.
https://github.com/samrushing/cps-python/
-Sam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20121109/828e006f/attachment.pgp>
More information about the Python-ideas
mailing list