]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[doc] Remove mention of async and await as soft keywords (GH-22144)
authorAndre Delfino <adelfino@gmail.com>
Mon, 12 Oct 2020 13:52:30 +0000 (10:52 -0300)
committerGitHub <noreply@github.com>
Mon, 12 Oct 2020 13:52:30 +0000 (14:52 +0100)
Doc/reference/compound_stmts.rst

index 04a3948d0c9dcf293d05f8209f61b79b5f73a3d6..62986cb151964a88f26bd46d89cc436068ad3f66 100644 (file)
@@ -768,10 +768,8 @@ Coroutine function definition
    keyword: await
 
 Execution of Python coroutines can be suspended and resumed at many points
-(see :term:`coroutine`).  Inside the body of a coroutine function, ``await`` and
-``async`` identifiers become reserved keywords; :keyword:`await` expressions,
-:keyword:`async for` and :keyword:`async with` can only be used in
-coroutine function bodies.
+(see :term:`coroutine`). :keyword:`await` expressions, :keyword:`async for` and
+:keyword:`async with` can only be used in the body of a coroutine function.
 
 Functions defined with ``async def`` syntax are always coroutine functions,
 even if they do not contain ``await`` or ``async`` keywords.
@@ -785,6 +783,9 @@ An example of a coroutine function::
         do_stuff()
         await some_coroutine()
 
+.. versionchanged:: 3.7
+   ``await`` and ``async`` are now keywords; previously they were only
+   treated as such inside the body of a coroutine function.
 
 .. index:: statement: async for
 .. _`async for`: