Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"inlineCallbacks" is 3 lines long. "_inlineCallbacks" is around 50 lines long :)

Let's not get into discussion if tornado is better or not than twisted. Both have similar mechanism to flatten generators and both mechanisms are much more complex than one could expect. Also, both of them heavily depend on python exception handling.

BTW, this is brilliant:

    # This function is complicated by the need to prevent unbounded recursion
    # arising from repeatedly yielding immediately ready deferreds.  This while
    # loop and the waiting variable solve that by manually unfolding the
    # recursion.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: