Why Python does *SLICING* the way it does??
Bernhard Herzog
bh at intevation.de
Wed Apr 20 11:28:01 EDT 2005
Torsten Bronger <bronger at physik.rwth-aachen.de> writes:
> 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.
There are very good reasons for half-open intervals and starting at 0
apart from memory organization. Dijkstra explained this quite well in
http://www.cs.utexas.edu/users/EWD/ewd08xx/EWD831.PDF
Bernhard
--
Intevation GmbH http://intevation.de/
Skencil http://skencil.org/
Thuban http://thuban.intevation.org/
More information about the Python-list
mailing list