[Python-Dev] Single- vs. Multi-pass iterability

Greg Ewing greg@cosc.canterbury.ac.nz
Thu, 18 Jul 2002 12:05:39 +1200 (NZST)


Guido:

> Generally speaking, iterator implementations aren't created by making
> changes to an existing class

Continuing with my scanner example, it's conceivable
that I might want to give it an iterator interface
as an alternative to the existing one -- it's already
an iterator, really, it just doesn't have the
new standard iterator interface.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg@cosc.canterbury.ac.nz	   +--------------------------------------+