On 06.09.2016 20:37, Nick Coghlan wrote:
On 7 September 2016 at 04:24, Sven R. Kunze <srku...@mail.de> wrote:
Python async community wants you to write everything twice: for the sync and
async case. And don't dare to mentioned code sharing here. They will rip you
apart. ;)

Just kidding. Of course would it be great to write code only once but Yury
want to preserve well-paid Python dev jobs in the industry because
everything here needs to be maintained twice then. ;)
Sven, this is not productive, not funny, and not welcome. Vent your
frustrations with the fundamental split between synchronous and
explicitly asynchronous software design elsewhere.

Don't make a mistake here, Nick. I take this with some humor as it does not concern me in production. It's interesting to see though that people new to the discussion detect this obvious issue very fast.


No really, I have absolutely no idea why you need to put that "async" in all
places where Python can detect automatically if it needs to perform an async
iteration or not. Maybe, Yury can explain.
As Anthony already noted, the "async" keyword switches to the
asynchronous version of the iterator protocol - you use this when your
*iterator* needs to interact with the event loop, just as you do when
deciding whether or not to mark a for loop as asynchronous.

Of course "async" switches to async mode. But that was not the question. I asked WHY that's necessary not what it does. I already noted that Python can detect when to make the switch without a marker. And you fail to explain where the issue with this point of view is.


Sven

PS: Nick, I noted that while replying, my mail client made me responding to you and the list as cc. Is there something wrong with my config or is this deliberate on your part?
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to