diff options
author | Andre Delfino <adelfino@gmail.com> | 2020-10-12 13:52:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-12 13:52:30 (GMT) |
commit | 8adf8d1ec45fe0d87e2312a13a3ec0b8ab03fea1 (patch) | |
tree | dc9f056245f7640f69c80403df9a91968349377e /Doc/reference/compound_stmts.rst | |
parent | 13ff396c019d548ba181cf22c6f39309a300723c (diff) | |
download | cpython-8adf8d1ec45fe0d87e2312a13a3ec0b8ab03fea1.zip cpython-8adf8d1ec45fe0d87e2312a13a3ec0b8ab03fea1.tar.gz cpython-8adf8d1ec45fe0d87e2312a13a3ec0b8ab03fea1.tar.bz2 |
[doc] Remove mention of async and await as soft keywords (GH-22144)
Diffstat (limited to 'Doc/reference/compound_stmts.rst')
-rw-r--r-- | Doc/reference/compound_stmts.rst | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst index 04a3948..62986cb 100644 --- a/Doc/reference/compound_stmts.rst +++ b/Doc/reference/compound_stmts.rst @@ -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`: |