[Python-Dev] async/await behavior on multiple calls

Barry Warsaw barry at python.org
Tue Dec 15 20:41:37 EST 2015


On Dec 15, 2015, at 05:29 PM, Roy Williams wrote:

>@Kevin correct, that's the point I'd like to discuss.  Most other
>mainstream languages that implements async/await expose the programming
>model with Tasks/Futures/Promises as opposed to coroutines  PEP 492 states
>'Objects with __await__ method are called Future-like objects in the rest
>of this PEP.' but their behavior differs from that of Futures in this core
>way.  Given that most other languages have standardized around async
>returning a Future as opposed to a coroutine I think it's worth exploring
>why Python differs.

I'll just note something I've mentioned before, when a bunch of us sprinted on
an asyncio based smtp server.

The asyncio library documentation *really* needs a good overview and/or
tutorial.  These are difficult concepts to understand and it seems like
bringing experience from other languages may not help (and may even hinder)
understanding of Python's model.  After a while, you get it, but I think it
would be good to help folks get there sooner, especially if you're new to the
whole area.

Maybe those of you who have been steeped in asyncio for a long time could
write that up?  I don't think I'm the right person to do that, but I'd be very
happy to review it.

Cheers,
-Barry


More information about the Python-Dev mailing list