Asyncio -- delayed calculation

Marko Rauhamaa marko at pacujo.net
Wed Nov 30 17:29:46 EST 2016


Gregory Ewing <greg.ewing at canterbury.ac.nz>:
> My point is that for someone who *doesn't* know, simplistic attempts
> to explain what "await" means can be very misleading.
>
> There doesn't seem to be any accurate way of summarising it in a few
> words. The best we can do seems to be to just say "it's a magic word
> that you have to put in front of any call to a function that you
> defined as async".

I don't think it needs any other explanation. (Thousands of debugging
hours will likely be spent locating the missing "await" keywords.)

> I think it's possible to build a conceptual model that's easier to
> grasp and hides more of the underlying machinery.

I'm thinking the problem with asyncio is the very fact that it is hiding
the underlying callbacks. I'm also predicting there will be quite a bit
of asyncio code that ironically converts coroutines back into callbacks.

> PEP 3152 was my attempt at doing that. Unfortunately, we seem to have
> gone down a fork in the road that leads somewhere else and from which
> there's no getting back.

Alea jacta est.


Marko



More information about the Python-list mailing list