[issue13480] range exits loop without action when start is higher than end

2011-11-25 Thread R. David Murray
R. David Murray added the comment: Nope. If you want to count backward, use a negative step. Not doing anything if end is lower than start allows code to take advantage of "don't care" edge cases, just like 'abc'[4:] returning the empty string does. Range is often used in 'for' loops, so h

[issue13480] range exits loop without action when start is higher than end

2011-11-25 Thread Asa Dawson
New submission from Asa Dawson : range has an odd behavior in which it assumes (regardless of start/end) that it should be counting up. Attempting something such as: for i in range(10,0): print i This loop simply runs through without doing anything, because start is larger than end. I'm