Skip to content

Commit fd108e5

Browse files
miss-islingtonramvikramsCAM-Gerlach
authored
gh-100201: Document behavior with a bare yield statement (GH-100416)
(cherry picked from commit 1aab269) Co-authored-by: ram vikram singh <[email protected]> Co-authored-by: C.A.M. Gerlach <[email protected]>
1 parent e3b303a commit fd108e5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Doc/reference/expressions.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,9 @@ generator. That generator then controls the execution of the generator
449449
function. The execution starts when one of the generator's methods is called.
450450
At that time, the execution proceeds to the first yield expression, where it is
451451
suspended again, returning the value of :token:`~python-grammar:expression_list`
452-
to the generator's caller. By suspended, we mean that all local state is
452+
to the generator's caller,
453+
or ``None`` if :token:`~python-grammer:expression_list` is omitted.
454+
By suspended, we mean that all local state is
453455
retained, including the current bindings of local variables, the instruction
454456
pointer, the internal evaluation stack, and the state of any exception handling.
455457
When the execution is resumed by calling one of the generator's methods, the

0 commit comments

Comments
 (0)