[New-bugs-announce] [issue39545] await is not supported in f-string in 3.6

Serhiy Storchaka report at bugs.python.org
Mon Feb 3 13:26:38 EST 2020

New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

The following code is compiled in 3.7, but is a syntax error in 3.6.

async def f(x):
    f"{await x}"

I have not found mentioning this change in What's New, and it looks grammatically correct. It looks as a bug in 3.6.

It may be too later to fix it in 3.6, but at least it should be documented.

assignee: docs at python
components: Documentation, Interpreter Core
messages: 361317
nosy: docs at python, eric.smith, serhiy.storchaka
priority: normal
severity: normal
status: open
title: await is not supported in f-string in 3.6
type: behavior
versions: Python 3.6

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list