PEP 276 Simple Iterator for ints (fwd)

damien morton morton at
Wed Nov 28 05:24:46 CET 2001

James_Althoff at wrote in message news:<mailman.1006885715.29643.python-list at>...
> Greg Ewing wrote:
> >While trying to think of a range syntax that looks
> >unambiguously half-open without clashing with list
> >or tuple constructors, the following blindingly
> >obvious solution occurred to me:
> >
> >  for 0 <= i < 5:
> >    ...
> Greg,
> Since this looks like a suggestion for replacing xrange in the general
> case, did you have any thoughts on how one might specify a step value?
> Jim

is a step value really necessary? 

I have very rarely used a step vale, except when programming in C, and
even then only in ill-defined cases.

Anyone else iterate in Python in steps larger than 1?

More information about the Python-list mailing list