It was decided to leave out 'yield from' support for async generators,
at least for now, due to the implementation complexity. And non-empty
returns in generators are only intended for use with 'yield from', so
they got left out as well.

On Mon, Aug 24, 2020 at 4:48 PM Paul Bryan <pbr...@anode.ca> wrote:
>
> Per PEP 515:
>
> It is a SyntaxError to have a non-empty return statement in an asynchronous 
> generator.
>
>
> Synchronus generators can return values that include it in the StopIteration 
> exception. Why would a return value in an asynchronous generator not do the 
> same in the StopAsyncIteration?
>
> _______________________________________________
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at 
> https://mail.python.org/archives/list/python-dev@python.org/message/IYF6QKMNSTZEVEXBDIJH7NO2VNDJNUZJ/
> Code of Conduct: http://python.org/psf/codeofconduct/



-- 
Nathaniel J. Smith -- https://vorpus.org
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/ZGYKS2MS2LRGKHU7KD2ZO4SMH3GB3HR5/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to