Lambda the Ultimate

inactiveTopic Python Iterators (proposal)
started 5/2/2001; 6:11:54 AM - last post 5/2/2001; 6:11:54 AM
Ehud Lamm - Python Iterators (proposal)  blueArrow
5/2/2001; 6:11:54 AM (reads: 1946, responses: 0)
Python Iterators (proposal)
(via Daily Python-URL)

This document proposes an iteration interface that objects can provide to control the behaviour of 'for' loops. Looping is customized by providing a method that produces an iterator object. The iterator provides a 'get next value' operation that produces the next item in the sequence each time it is called, raising an exception when no more items are available.

We discussed iterators here in the past.

This proposal doesn't seem to be very innovative or sexy. Maybe another design iteration is needed

Posted to Python by Ehud Lamm on 5/2/01; 6:14:06 AM