Message 316584 - Python tracker
> Did you mean {} for the outer brackets intead of []?
Yes, my bad.
> All of these should only be allowed inside 'async def' though, right?
Yep, except async generator expressions which are allowed to appear in synchronous contexts, e.g.:
def foo():
return (i async for i in ai)
(this already works in 3.7).