En Tue, 15 May 2007 02:12:40 -0300, Raymond Hettinger <[EMAIL PROTECTED]> escribió:
>> I feel I'm out of luck, but if someone could point some way to write a >> generator in C, I'be very grateful! > > Perhaps the code in the itertools module will provide a good example > -- they behave like generators in many respects except that you are > responsible for tracking state and jumping to an appropriate resume > point. Being C, it won't be as convenient as Python generators, but > should be able to translate any generator into equivalent C. Oh, thanks for pointing that! (I didn't know the itertools module was written in C - I supposed it was a Python module). After a brief reading, I think I'll use something similar to how tee and teedataobject store current state. -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list