[issue3004] Bug in slice.indices()

2008-06-18 Thread Arnaud Bergeron
Arnaud Bergeron <[EMAIL PROTECTED]> added the comment: Would these do? self.assertEqual(slice(None, -10).indices(10), (0, 0, 1)) self.assertEqual(slice(None, -11, ).indices(10), (0, 0, 1)) self.assertEqual(slice(None, -12, -1).indices(10), (9, -1, -1)) If yes, test_slice

[issue3004] Bug in slice.indices()

2008-06-09 Thread Arnaud Bergeron
Arnaud Bergeron <[EMAIL PROTECTED]> added the comment: Don't blame me for the delay, I have long days (yes, really up to 96 hours long :) As for the documentation patch, I'm not certain anymore about it. Unless I bloat the description to about one full screen worth of text, t

[issue3004] Bug in slice.indices()

2008-06-05 Thread Arnaud Bergeron
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.i

[issue3004] Bug in slice.indices()

2008-05-29 Thread Arnaud Bergeron
New submission from Arnaud Bergeron <[EMAIL PROTECTED]>: When calling the indices method of a slice object with a negative stop larger in absolute value than the length passed, the returned stop value is always -1. It should be 0 when the step is positive. Current behavior: >>