stackless python

holger krekel pyth at
Sat Aug 3 20:08:48 CEST 2002

Christian Tismer wrote:
> Neil Schemenauer wrote:
> > François Pinard wrote:
> > 
> >>(My main question, maybe already answered in there -- I did not check yet
> >>-- is how one proceeds to `yield' from within a nest of function calls,
> >>and to later kludge resuming the function nesting sequence on `.next()'.)
> > 
> > 
> > You can't since only one stack frame is saved per generator.  That's why
> > one of the reasons they are called simple generators (two others being
> > ease of implementation and of understanding).  You probably want to look
> > at stackless Python if you haven't already.
> Btw., thanks for the generators! They made it quite easy for me to
> create a "runnable frame" without having to deal with paramters
> and such. Just create a temporary generator and peel the frame off :-)
> With the restriction of "pure python only", that means no method
> calls, no cfunctions ...

I can't see where you draw the line.  Obviously (c)functions are called 
even for a 'str' call. Heck, anything calls something. Where do you
draw the line? 



More information about the Python-list mailing list