New submission from Zsolt Dollenstein <[email protected]>:
Since 3.7, async generators can be used in non-async functions. The way this is
implemented allows the following to be valid syntax:
def f():
async for i in aiterable:
pass
return 1
The return value of the above function is a Future that will never be done().
----------
components: Interpreter Core
messages: 315775
nosy: zsol
priority: normal
severity: normal
status: open
title: async for statement is not a syntax error in sync context
type: behavior
versions: Python 3.7, Python 3.8
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue33363>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com