Ticket #763 (closed defect: fixed)
reversed(range(start, stop, step)) is wrong
|Reported by:||mark||Owned by:||scoder|
When iterating over reversed(range()), the reversed swaps the bounds of the range() and offsets it by one. This is wrong for a step that is not 1 or -1. Example:
cdef int i for i in reversed(range(0, 10, 4)): print i print list(reversed(range(0, 10, 4)))
9 5 1 [8, 4, 0]
Note: See TracTickets for help on using tickets.