From dddb2a7ec64b6c563fb7fd44e1df1f9c05cc3df0 Mon Sep 17 00:00:00 2001 From: Jacob Walls Date: Fri, 7 Jan 2022 13:39:40 -0500 Subject: [PATCH] bpo-24650: Use full term "generator function" in yield expressions docs (GH-24663) (cherry picked from commit 273cb8e7577d143830404f6779946a0bedb58758) Co-authored-by: Jacob Walls --- Doc/reference/expressions.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst index c3f58fc8416161..d4aae29725fb4c 100644 --- a/Doc/reference/expressions.rst +++ b/Doc/reference/expressions.rst @@ -422,9 +422,9 @@ Yield expressions The yield expression is used when defining a :term:`generator` function or an :term:`asynchronous generator` function and thus can only be used in the body of a function definition. Using a yield -expression in a function's body causes that function to be a generator, +expression in a function's body causes that function to be a generator function, and using it in an :keyword:`async def` function's body causes that -coroutine function to be an asynchronous generator. For example:: +coroutine function to be an asynchronous generator function. For example:: def gen(): # defines a generator function yield 123