PEP 276 Simple Iterator for ints (fwd)

James_Althoff at i2.com James_Althoff at i2.com
Wed Nov 14 20:04:19 EST 2001


Paul Rubin  wrote:

>Sometimes you want to use the index in the loop.  Maybe the loop syntax
>should be extended somehow to easily let you do that.

PEP 212 "Loop Counter Iteration" suggests such changes.

This doesn't address cases where you are dealing with something that
doesn't follow the sequence protocol, e.g., DefaultTableModel -- where
cells are accessed via the getValueAt(rowIndex,columnIndex) method.

Jim





More information about the Python-list mailing list