File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -768,10 +768,8 @@ Coroutine function definition
768768 keyword: await
769769
770770Execution 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
776774Functions defined with ``async def `` syntax are always coroutine functions,
777775even 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` :
You can’t perform that action at this time.
0 commit comments