Why Python does *SLICING* the way it does??

Torsten Bronger bronger at physik.rwth-aachen.de
Wed Apr 20 09:16:55 EDT 2005


Hallöchen!

Antoon Pardon <apardon at forel.vub.ac.be> writes:

> Op 2005-04-20, Torsten Bronger schreef <bronger at physik.rwth-aachen.de>:
>
>> [...]
>>
>> It's interesting to muse about a language that starts at "1" for
>> all arrays and strings, as some more or less obsolete languages
>> do.  I think this is more intuitive, since most people (including
>> mathematicians) start counting at "1".  The reason for starting
>> at "0" is easier memory address calculation, so nothing for
>> really high level languages.
>
> 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.

In HTBasic you have the choice between 0 and 1; there is a global
source code directive for it.  However, hardly anybody really wants
to use HTBasic.

Tschö,
Torsten.

-- 
Torsten Bronger, aquisgrana, europa vetus



More information about the Python-list mailing list