Negative array indicies and slice()

Ethan Furman ethan at
Thu Nov 1 17:15:14 CET 2012

Chris Angelico wrote:
> On Fri, Nov 2, 2012 at 1:12 AM, Ethan Furman <ethan at> wrote:
>> In other words, the slice contains the strings, and my code calculates
>> the offsets -- Python doesn't do it for me.
> That's correct, but you're still translating those strings into
> numeric indices.

True, but the point is that the /slice/ contains a data type that is
neither a number, nor directly translatable into a number (that is, no
__index__ method), and my code would cease to function should that
change to slices be made.


More information about the Python-list mailing list