[Python-ideas] Learning from the shell in supporting asyncio background calls

Sven R. Kunze srkunze at mail.de
Thu Aug 20 17:27:29 CEST 2015


On 19.08.2015 11:24, Nick Coghlan wrote:
>
> Catching up on email after travelling last week, I want to explicitly
> note that don't agree with this any more - there's one method name on
> the event loop I think needs tweaking (for background blocking calls
> in another thread or process), but PEP 492 otherwise delivers all the
> pieces needed to make it straightforward to run the event loop as
> needed from synchronous code. I did a lightning talk about that at
> PyCon Australia, which I'll turn into another
> asyncio-in-your-synchronous-test-suite blog post at some point:
> https://www.youtube.com/watch?v=_pfJZfdwkgI
Nice video!
> Explicitly asynchronous code is as much a tool for thinking as it is
> an execution model, so I've come to realise that folks wanting to hide
> the conceptual modelling is akin to the complaints we hear from folks
> learning imaginary numbers for the first time, and insisting that real
> numbers ought to be enough for anyone.

That is where I disagree. It is not about insisting that it would be 
enough. It is about insisting that giving it a try is not equal to 
rewrite 100% of your code.

> Yes, asyncio (like Twisted
> before it) does stretch our brains in new and interesting ways -
> that's the main reason it's worth having in the standard library :)

That certainly is very true. During all these discussions, I really 
learned a lot.

However, the main intention has not been changed: lowering the entry 
barriers.


More information about the Python-ideas mailing list