João Sebastião de Oliveira Bueno <gwid...@gmail.com> 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 anything different from
(9, -1, -2)
It would be impossible to properly generate the desired indices. (With a 0 
instead of -1, we would be missing the last index).

When you pass these numbers with the "[" "]" notation for being used as 
indices, the negative index is interpreted as "len(sequence) - index". In the 
case of "-1" in your example it is the same as "9" not the same as "one before 
zero".

I recommend closing this as not a bug.

----------
nosy: +João.Sebastião.de.Oliveira.Bueno

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11842>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to