Fix a remnant of the old proposal found by Tim Delaney.
This commit is contained in:
parent
9b82c24996
commit
036431dd4f
16
pep-0340.txt
16
pep-0340.txt
|
@ -327,14 +327,14 @@ Specification: Generator Exit Handling
|
|||
body.
|
||||
|
||||
When __next__() is called with an argument that is not None, the
|
||||
yield-expression that it resumes will return the value attribute
|
||||
of the argument. If it resumes a yield-statement, the value is
|
||||
ignored (this is similar to ignoring the value returned by a
|
||||
function call). When the *initial* call to __next__() receives an
|
||||
argument that is not None, TypeError is raised; this is likely
|
||||
caused by some logic error. When __next__() is called without an
|
||||
argument or with None as argument, and a yield-expression is
|
||||
resumed, the yield-expression returns None.
|
||||
yield-expression that it resumes will return the argument. If it
|
||||
resumes a yield-statement, the value is ignored (this is similar
|
||||
to ignoring the value returned by a function call). When the
|
||||
*initial* call to __next__() receives an argument that is not
|
||||
None, TypeError is raised; this is likely caused by some logic
|
||||
error. When __next__() is called without an argument or with None
|
||||
as argument, and a yield-expression is resumed, the
|
||||
yield-expression returns None.
|
||||
|
||||
When a generator that has not yet terminated is garbage-collected
|
||||
(either through reference counting or by the cyclical garbage
|
||||
|
|
Loading…
Reference in New Issue