On Wed, Sep 7, 2016 at 2:11 PM, Nick Coghlan <ncogh...@gmail.com> wrote: > On 7 September 2016 at 04:54, Sven R. Kunze <srku...@mail.de> wrote: >> On 06.09.2016 20:37, Nick Coghlan wrote: >>> 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. > > The Python *runtime* can tell whether the result of an expression is a > normal iterator or an asynchronous iterator, but the Python *compiler* > can't.
Yes, so to remove "async" from the syntax, this would be handled at runtime. But there's no way this PEP is going to do that, so I agree there's no point in discussing this here. -- Koos -- + Koos Zevenhoven + http://twitter.com/k7hoven + _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/