A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-August/048264.html below:

[Python-Dev] Minimal 'stackless' PEP using generators?

[Python-Dev] Minimal 'stackless' PEP using generators?Phillip J. Eby pje at telecommunity.com
Mon Aug 23 22:16:08 CEST 2004
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.

More information about the Python-Dev mailing list

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