python list index - an easy question
ben.usenet at bsb.me.uk
Mon Dec 19 15:44:39 EST 2016
Jussi Piitulainen <jussi.piitulainen at helsinki.fi> writes:
> Ben Bacarisse writes:
>> BartC writes:
>>> You need to take your C hat off, I think.
>> It's a computing hat. Indexes are best seen as offsets (i.e. as a
>> measured distances from some origin or base). It's a model that grew
>> out of machine addressing and assembler address modes many, many
>> decades ago -- long before C. C, being a low-level language,
>> obviously borrowed it, but pretty much all the well-thought out
>> high-level languages have seen the value in it too, though I'd be
>> interested in hearing about counter examples.
> Julia, at version 0.5 of the language, is a major counter-example:
> 1-based, closed ranges. I think they have been much influenced by the
> mathematical practice in linear algebra, possibly through another
> computing language.
More information about the Python-list