8000 gh-100201: Document behavior with a bare `yield` statement (#100416) · python/cpython@1aab269 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1aab269

Browse files
gh-100201: Document behavior with a bare yield statement (#100416)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
1 parent 1d1480f commit 1aab269

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Doc/reference/expressions.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,9 @@ generator. That generator then controls the execution of the generator
454454
function. The execution starts when one of the generator's methods is called.
455455
At that time, the execution proceeds to the first yield expression, where it is
456456
suspended again, returning the value of :token:`~python-grammar:expression_list`
457-
to the generator's caller. By suspended, we mean that all local state is
457+
to the generator's caller,
458+
or ``None`` if :token:`~python-grammer:expression_list` is omitted.
459+
By suspended, we mean that all local state is
458460
retained, including the current bindings of local variables, the instruction
459461
pointer, the internal evaluation stack, and the state of any exception handling.
460462
When the execution is resumed by calling one of the generator's methods, the

0 commit comments

Comments
 (0)
0