[Python-checkins] gh-100201: Document behavior with a bare `yield` statement (#100416)

kumaraditya303 webhook-mailer at python.org
Sun Jan 1 10:36:18 EST 2023


https://github.com/python/cpython/commit/1aab269d4acbf0b29573ad0a21c54fddee233243
commit: 1aab269d4acbf0b29573ad0a21c54fddee233243
branch: main
author: ram vikram singh <ramvikrams243 at gmail.com>
committer: kumaraditya303 <59607654+kumaraditya303 at users.noreply.github.com>
date: 2023年01月01日T21:06:13+05:30
summary:
gh-100201: Document behavior with a bare `yield` statement (#100416)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach at Gerlach.CAM>
files:
M Doc/reference/expressions.rst
diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst
index 920e4d19b82d..6692e50c4ff4 100644
--- a/Doc/reference/expressions.rst
+++ b/Doc/reference/expressions.rst
@@ -454,7 +454,9 @@ generator. That generator then controls the execution of the generator
 function. The execution starts when one of the generator's methods is called.
 At that time, the execution proceeds to the first yield expression, where it is
 suspended again, returning the value of :token:`~python-grammar:expression_list`
-to the generator's caller. By suspended, we mean that all local state is
+to the generator's caller,
+or ``None`` if :token:`~python-grammer:expression_list` is omitted.
+By suspended, we mean that all local state is
 retained, including the current bindings of local variables, the instruction
 pointer, the internal evaluation stack, and the state of any exception handling.
 When the execution is resumed by calling one of the generator's methods, the


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /