Author anakha
Recipients anakha, mark.dickinson
Date 2008-06-05.22:20:59
SpamBayes Score 0.000238737
Marked as misclassified No
Message-id <f70460160806051520x6655005kad0c0cd578e712ab@mail.gmail.com>
In-reply-to <1212675882.63.0.0230555912884.issue3004@psf.upfronthosting.co.za>
Content
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?
History
Date User Action Args
2008-06-05 22:21:12anakhasetspambayes_score: 0.000238737 -> 0.000238737
recipients: + anakha, mark.dickinson
2008-06-05 22:21:10anakhalinkissue3004 messages
2008-06-05 22:21:02anakhacreate