Allowing the 'await' keyword to be omitted would also present some
semantic and implementation difficulties. The mechanism behind
'await' is essentially the same as 'yield from', so you're more
or less asking for 'yield from' to be automagically applied to
the result of an expression.

But this would require reading the programmer's mind, because it's
quite legitimate to create an iterator and keep it around to be
yielded from later. Likewise, it's legitimate to create an awaitable
object and then await it later.

(Personally I think it *shouldn't* be legitimate to do that in
the case of await, but Guido thinks otherwise, so it is the way
it is.)

--
Greg
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/WPY26CQVDOWUGQTC6FXLENDTMCSXDJ35/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to