In the comments of there were some complaints about the interpretation of the bounds for negative strides, and I have to admin it feels wrong. Where did we go wrong? For example,

"abcde"[::-1] == "edcba"

as you'd expect, but there is no number you can put as the second bound to get the same result:

"abcde"[:1:-1] == "edc"
"abcde"[:0:-1] == "edcb"


"abcde":-1:-1] == ""

I'm guessing it all comes from the semantics I assigned to negative stride for range() long ago, unthinkingly combined with the rules for negative indices.

Are we stuck with this forever? If we want to fix this in Python 4 we'd have to start deprecating negative stride with non-empty lower/upper bounds now. And we'd have to start deprecating negative step for range() altogether, recommending reversed(range(lower, upper)) instead.

Thoughts? Is NumPy also affected?

--Guido van Rossum (