[New-bugs-announce] [issue33363] async for statement is not a syntax error in sync context
Zsolt Dollenstein
report at bugs.python.org
Thu Apr 26 01:18:50 EDT 2018
New submission from Zsolt Dollenstein <zsol.zsol at gmail.com>:
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 <report at bugs.python.org>
<https://bugs.python.org/issue33363>
_______________________________________
More information about the New-bugs-announce
mailing list