[Python-ideas] The async API of the future: Twisted and Deferreds

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Oct 15 02:23:52 CEST 2012


Guido van Rossum wrote:

> The thing that worries me most is reimplementing httplib, urllib and
> so on to use all this new machinery *and* keep the old synchronous
> APIs working *even* if some code is written using the old style and
> some other code wants to use the new style.

I think this could be handled the same way you alluded to
before when talking about the App Engine. The base implementation
is asynchronous, and you provide a synchronous API that sets
up an async operation and then runs a nested event loop until
it completes.

-- 
Greg



More information about the Python-ideas mailing list