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.

> 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.

Regards,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
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