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?<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Nov 10, 2012 at 4:06 AM, Sam Rushing <span dir="ltr"><<a href="mailto:sam-pydeas@rushing.nightmare.com" target="_blank">sam-pydeas@rushing.nightmare.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The discussion last week with Greg Ewing got me to thinking about the<br>
CPS transform, and how it might be a useful technique for<br>
callback/event-driven code like asyncore & Twisted.  I'm pretty sure<br>
when I first thought about this eons ago it was before Python had<br>
closures.  They definitely make it a bit easier!<br>
<br>
I put some simple demo code together, I think it demonstrates that the<br>
idea is feasible, I'm curious to know if anyone is interested.<br>
<br>
Don't get hung up on the poor quality of the generated code, big<br>
improvements could be made with a little bit of work.<br>
<br>
<a href="https://github.com/samrushing/cps-python/" target="_blank">https://github.com/samrushing/cps-python/</a><br>
<span class="HOEnZb"><font color="#888888"><br>
-Sam<br>
<br>
<br>
</font></span><br>_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-ideas" target="_blank">http://mail.python.org/mailman/listinfo/python-ideas</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>cheers<div>lvh</div><br>
</div>