Arnaud Bergeron <[EMAIL PROTECTED]> added the comment: It's for code that I am developping. I developped a class to allow full slicing over iterators (like what islice does, but with negative indexes). When I have a positive step I just foward the call to isclice using slice.indices() to compute my limits. But with this behavior, I am forced to wrap the indices() call with a function that patches this case.
I agree that for the common usage of computing the limits of a for loop it doesn't matter. But it is really surprising when you realise this behavior is what is causing these exceptions after having passed half a day trying to debug your code. In fact, I think this bug should really be more of a documentation bug and I should propose a patch to add clearer documentation to this method. But the fix proposed should also go in because: - it's trivial - it's better Documentation for the method will be submitted later tomorrow. Should I post another report or just attach it to this one? _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3004> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com