generator functions in another language

metawilm at gmail.com metawilm at gmail.com
Mon May 5 14:55:38 EDT 2008


On May 4, 1:11 pm, castiro... at gmail.com wrote:
> There is no such thing as a 'frame' per se in C; byte code is
> integral.  As there is no such thing as suspended state without
> frames, and no such thing as generators without suspended state.

Well, for implementing generators there are alternatives to using
frames + byte code. In CLPython generators are implemented with
closures. (Which does not help much when it comes to reimplementing
generators in C, alas.)

- Willem



More information about the Python-list mailing list