Python/C API

Martin v. Löwis martin.vonloewis at hpi.uni-potsdam.de
Thu Apr 10 04:34:38 EDT 2003


>   How does one write generators in C, or does one not?

One does not. Instead, just implement a function that returns an iterator.
Python applications cannot tell the difference between an iterator and the
result of calling a generator.

Regards,
Martin






More information about the Python-list mailing list