[Python-ideas] async/await in Python

Todd toddrjen at gmail.com
Sat Apr 18 12:41:01 CEST 2015


On Apr 17, 2015 8:59 PM, "Yury Selivanov" <yselivanov.ml at gmail.com> wrote:
>
> <snip>
>
>     async with EXPR as VAR:
>         BLOCK
>
>
>  <snip>
>
>     async for TARGET in ITER:
>         BLOCK
>     else:
>         BLOCK2
>

Is this really something that should restricted to async?  I could see
similar syntax being useful for multithreading, multiprocessing, MPI, etc.
What about a more general language feature, where any class implementing
certain magic methods could be used in this way?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150418/024bb5bb/attachment.html>


More information about the Python-ideas mailing list