a possibly foolish question about slices

Andrew Koenig ark at research.att.com
Fri Jun 14 15:27:51 EDT 2002


Eddie> Hmm, I was actually trying to suggest (non-seriously) fixing
Eddie> zero based indexing! but I realise now that wasn't clear.

It's hard to imagine how it would be possible to change to 1-based
indexing without breaking lots of code.

For that matter, I had the thought that it might be possible simply
to define x[n:0] as meaning x[n:len(x)] if n<0, but I imagine that
even that would break too much code.

-- 
Andrew Koenig, ark at research.att.com, http://www.research.att.com/info/ark



More information about the Python-list mailing list