[issue11842] slice.indices with negative step and default stop

2012-11-04 Thread Mark Dickinson
Mark Dickinson added the comment: Agreed. Closing. -- resolution: -> invalid status: open -> closed ___ Python tracker ___ ___ Pytho

[issue11842] slice.indices with negative step and default stop

2012-11-03 Thread Mark Lawrence
Mark Lawrence added the comment: I think this should be closed as slice.indices behaves exactly as I expect it to, and the returned values are for any sequence and not just range(). -- nosy: +BreamoreBoy ___ Python tracker

[issue11842] slice.indices with negative step and default stop

2011-11-19 Thread Ezio Melotti
Changes by Ezio Melotti : -- keywords: +easy stage: -> needs patch versions: +Python 2.7, Python 3.3 -Python 3.1 ___ Python tracker ___ _

[issue11842] slice.indices with negative step and default stop

2011-04-14 Thread Daniel Urban
Daniel Urban added the comment: I see. Thanks for the explanation. If indeed this is the expected behaviour (as it seems), then I suggest clarifying the documentation. I think it would be good to mention that the returned values are for range(), and not for creating another slice object. ---

[issue11842] slice.indices with negative step and default stop

2011-04-13 Thread João Sebastião de Oliveira Bueno
João Sebastião de Oliveira Bueno added the comment: I don't see this as a bug. The indices returned in both cases are exactly what you need to feed to range, in order to get the correct indices for the provided slice parameters. Perceive that if for s = slice(None, None, -2) It would return

[issue11842] slice.indices with negative step and default stop

2011-04-13 Thread Daniel Urban
New submission from Daniel Urban : slice.indices behaves strangely with negative step and default stop values (note that the doc says that it "computes information about the slice that the slice object would describe if applied to a sequence of length items"): >>> s = slice(None, None, -2) >>>