[Python-checkins] bpo-39545: docs: do not use await in f-strings (GH-18434)

Elena Oat webhook-mailer at python.org
Mon Feb 10 15:28:19 EST 2020


https://github.com/python/cpython/commit/a2963f09629a0a8c63e9acef79c1dcc0a040ddb6
commit: a2963f09629a0a8c63e9acef79c1dcc0a040ddb6
branch: 3.6
author: Elena Oat <oat.elena at gmail.com>
committer: GitHub <noreply at github.com>
date: 2020年02月10日T15:28:11-05:00
summary:
bpo-39545: docs: do not use await in f-strings (GH-18434)
files:
M Doc/reference/compound_stmts.rst
diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst
index 8d050a69a931d..b4e95b90dbc70 100644
--- a/Doc/reference/compound_stmts.rst
+++ b/Doc/reference/compound_stmts.rst
@@ -730,7 +730,7 @@ Functions defined with ``async def`` syntax are always coroutine functions,
 even if they do not contain ``await`` or ``async`` keywords.
 
 It is a :exc:`SyntaxError` to use ``yield from`` expressions in
-``async def`` coroutines.
+``async def`` coroutines. Using ``await`` in :keyword:`f-strings` will also produce a :exc:`SyntaxError`.
 
 An example of a coroutine function::
 


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /