diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2006-05-20 19:25:16 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2006-05-20 19:25:16 (GMT) |
commit | 1e9f574a183317872c81b8626d7cf2d619849289 (patch) | |
tree | 910d88da96f6bcca13e87773348fdfff59f39638 /Doc | |
parent | b688b6c30aae2ba2ae8d51d6ce0ed9d882b939e1 (diff) | |
download | cpython-1e9f574a183317872c81b8626d7cf2d619849289.zip cpython-1e9f574a183317872c81b8626d7cf2d619849289.tar.gz cpython-1e9f574a183317872c81b8626d7cf2d619849289.tar.bz2 |
Minor edits
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/whatsnew/whatsnew25.tex | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/whatsnew/whatsnew25.tex b/Doc/whatsnew/whatsnew25.tex index 2d7dd60..7b1c8f0 100644 --- a/Doc/whatsnew/whatsnew25.tex +++ b/Doc/whatsnew/whatsnew25.tex @@ -405,7 +405,7 @@ implementation by Thomas Lee.} Python 2.5 adds a simple way to pass values \emph{into} a generator. As introduced in Python 2.3, generators only produce output; once a -generator's code is invoked to create an iterator, there's no way to +generator's code was invoked to create an iterator, there was no way to pass any new information into the function when its execution is resumed. Sometimes the ability to pass in some information would be useful. Hackish solutions to this include making the generator's code @@ -525,8 +525,8 @@ one-way producers of information into both producers and consumers. Generators also become \emph{coroutines}, a more generalized form of subroutines. Subroutines are entered at one point and exited at -another point (the top of the function, and a \keyword{return -statement}), but coroutines can be entered, exited, and resumed at +another point (the top of the function, and a \keyword{return} +statement), but coroutines can be entered, exited, and resumed at many different points (the \keyword{yield} statements). We'll have to figure out patterns for using coroutines effectively in Python. |