At 03:41 PM 8/23/04 -0400, Clark C. Evans wrote: >(off list) > >On Mon, Aug 23, 2004 at 03:34:13PM -0400, Phillip J. Eby wrote: >| >Yes. The idea is for Python to maintain a stack of generators, and when >| >ever the top-most generator yields <magic> this yield skips the >| >intermediate generators on the stack, and goes immediately to the >| >calling function. >| >| That's not the part I mean. I'm talking about *after* that happens, when >| you *resume* the generators, and you'll need to reconstruct the stack as >| it stood when the generators were interrupted. > >Yes. The entire generator stack would have to be put back into play. Right, but you haven't offered any proposal for where this stack will come from, how it will actually work, etc. I personally don't see any way to implement your approach in CPython that doesn't essentially require re-implementing a portion of 'peak.events' in C, while adding the overhead of the control value check to *every* generator .next() operation, even in programs that don't use the feature.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4