PEP 276 Simple Iterator for ints (fwd)

James_Althoff at i2.com James_Althoff at i2.com
Tue Nov 27 13:27:31 EST 2001


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





More information about the Python-list mailing list