Op 2005-04-20, Terry Hancock schreef <[EMAIL PROTECTED]>: > On Wednesday 20 April 2005 07:52 am, Antoon Pardon wrote: >> Personnaly I would like to have the choice. Sometimes I prefer to >> start at 0, sometimes at 1 and other times at -13 or +7. > > Although I would classify that as a "rare use case". So, it "ought > to be possible to do it, but not necessarily easy".
The -13 and +7 may be rare cases, but I wouldn't call one as a start index a rare case. I often get data in files where each line is a record with delimited fields. When I ask which field contains certain data, I get an answer that depends on counting starting with one. So starting with one as index would seem the more natural choice here. As far as I'm concerend, 0 as a starting index is a rare use case. In the programs I write about 45% is a natural 1 for first index, about 50% is a don't care and 5% is a natural 0 first index and some fraction is others. So yes in most of my programs 0 as a starting index works fine, but that is because in a lot of programs it doesn't matter much which would be the first index. Now I can understand that for others the 0 as a natural start index is more frequent, but if we have two frequent use cases, it seems to me the language should provide the choice more easily as it does now. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list