Skip to content

Commit 8adf8d1

Browse files
[doc] Remove mention of async and await as soft keywords (GH-22144)
1 parent 13ff396 commit 8adf8d1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Doc/reference/compound_stmts.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -768,10 +768,8 @@ Coroutine function definition
768768
keyword: await
769769

770770
Execution of Python coroutines can be suspended and resumed at many points
771-
(see :term:`coroutine`). Inside the body of a coroutine function, ``await`` and
772-
``async`` identifiers become reserved keywords; :keyword:`await` expressions,
773-
:keyword:`async for` and :keyword:`async with` can only be used in
774-
coroutine function bodies.
771+
(see :term:`coroutine`). :keyword:`await` expressions, :keyword:`async for` and
772+
:keyword:`async with` can only be used in the body of a coroutine function.
775773

776774
Functions defined with ``async def`` syntax are always coroutine functions,
777775
even if they do not contain ``await`` or ``async`` keywords.
@@ -785,6 +783,9 @@ An example of a coroutine function::
785783
do_stuff()
786784
await some_coroutine()
787785

786+
.. versionchanged:: 3.7
787+
``await`` and ``async`` are now keywords; previously they were only
788+
treated as such inside the body of a coroutine function.
788789

789790
.. index:: statement: async for
790791
.. _`async for`:

0 commit comments

Comments
 (0)