Is current integer for-loop syntax a wart?

David Eppstein eppstein at ics.uci.edu
Fri Mar 8 19:34:29 CET 2002


On 3/8/02 10:26 AM -0800, Cromwell, Jeremy wrote:
> PEP 276 (Simple Iterator for ints) and PEP 284 (Integer for-loops), among
> others, are written from the perspective that the current integer for-loop
> syntax
>
>     for i in range(10):
>
> is a wart.  Is this true?

I think this is an inaccurate characterization of PEP 284 -- although it 
describes a unified syntax for all integer for-loops, the wart it's 
primarily addressed at is multi-parameter (not single-parameter) range.

-- 
David Eppstein       UC Irvine Dept. of Information & Computer Science
eppstein at ics.uci.edu http://www.ics.uci.edu/~eppstein/





More information about the Python-list mailing list