Sven R. Kunze added the comment:

> Why bother with asyncio at all?

Good question. My initial reaction to async+await was: 'great, finally a 
Pythonic (i.e. a single, explicit) way to do squeeze out more of our servers'. 
Moreover, the goal of 'being more like classic code' + 'having reasonable 
tracebacks' reads like 'nice, ready for production code'.

After reading the documentation, I was slightly confused by: coroutines, tasks, 
futures which somehow feel very similar. But because of the introduction of 
'await', I thought, we would not need to bother with that at all.


Then, people started to tell me that asyncio and normal execution could never 
interact with each other.


I cannot believe that. Python always gave me convenient tools. I cannot believe 
it should be different this time.


I can use properties the same way as attributes, i.e. I can substitute them 
with each other seamlessly. I can call class methods the same way as instance 
methods, i.e. I can substitute them with each other seamlessly. I can call 
functions that raise exceptions the same way as functions that raise no 
exceptions, i.e. I can substitute them with each other seamlessly.

It is just perfect. Comparing the projects I am involved, those using Python 
proceed at a much greater pace just because of these convenient tools.



So, I wanted to leverage asyncio's power without touching million lines of code 
as well. If asyncio is not the right tool, that is fine with me, but then I do 
not get why threading does not have its own syntax (and goals described above) 
whereas asyncio does. To me, I could accomplish the same more or less with both 
tools.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24571>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to