The README suggests that doing this optimization on a bytecode level may be better than doing it on a source/AST level. Can you explain why?
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
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
http://mail.python.org/mailman/listinfo/python-ideas