Clarify that there are some separable items.
This commit is contained in:
parent
036431dd4f
commit
82b1510121
15
pep-0340.txt
15
pep-0340.txt
|
@ -22,6 +22,21 @@ Introduction
|
|||
(Reliable Acquisition/Release Pairs), and PEP 325
|
||||
(Resource-Release Support for Generators).
|
||||
|
||||
I should clarify that there are a few separable proposals in this
|
||||
PEP.
|
||||
|
||||
- Using "continue EXPR" which calls its.__next__(EXPR) which
|
||||
becomes the return value of a yield-expression is entirely
|
||||
orthogonal with the rest of the PEP.
|
||||
|
||||
- Similarly, using a generator to "drive" a block statement is
|
||||
also separable; with just the definition of the block statement
|
||||
from the PEP you could implement all the examples using a class
|
||||
(similar to example 6, which is easily turned into a template).
|
||||
|
||||
But the key idea is using a generator to drive a block statement;
|
||||
the rest is elaboration.
|
||||
|
||||
Motivation and Summary
|
||||
|
||||
(Thanks to Shane Hathaway -- Hi Shane!)
|
||||
|
|
Loading…
Reference in New Issue