Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: On Fri, Apr 25, 2008 at 7:10 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: .. > I think I'd be okay with normalization on creation, so that range(0, > 5, 2) returns range(0, 6, 2). Hm, but isn't that odd? Why not the > other way around?
I find it natural to have start + len*step = stop invariant rather than start +(len-1)*step + 1 = stop. I may be influenced by C++ (STL) tradition of giving preference to "i != stop" over "i < stop" condition so that algorithms support iterators that are not ordered. I also believe some algorithmic simplifications will be possible with start + len*step = stop invariant. __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2603> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com