diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst index aeb4ada4fc4..2e832c2d22c 100644 --- a/Doc/reference/compound_stmts.rst +++ b/Doc/reference/compound_stmts.rst @@ -764,8 +764,8 @@ Is semantically equivalent to:: See also :meth:`__aiter__` and :meth:`__anext__` for details. -It is a :exc:`SyntaxError` to use ``async for`` statement outside of an -:keyword:`async def` function. +It is a :exc:`SyntaxError` to use an ``async for`` statement outside of a +coroutine. .. index:: statement: async with @@ -802,8 +802,8 @@ Is semantically equivalent to:: See also :meth:`__aenter__` and :meth:`__aexit__` for details. -It is a :exc:`SyntaxError` to use ``async with`` statement outside of an -:keyword:`async def` function. +It is a :exc:`SyntaxError` to use an ``async with`` statement outside of a +coroutine. .. seealso::