Iterators vs. Generators
Frank Tobin
ftobin at neverending.org
Mon Jun 10 23:05:44 EDT 2002
On 10 Jun 2002, Aahz wrote:
> So when would one actually write an iterator instead of a generator?
> I've been trying to think of an example and failing.
Probably any time you want to have the thing 'do more' by being a full
object. I personally haven't written any generators yet, but I do use
iterators a lot, just because I use OOP a lot.
--
Frank Tobin http://www.neverending.org/~ftobin/
More information about the Python-list
mailing list