Python Feature Request: Allow changing base of member indices to 1

Beliavsky beliavsky at aol.com
Sun Apr 15 19:06:35 EDT 2007


On Apr 14, 10:12 pm, "Paddy" <paddy3... at googlemail.com> wrote:

<snip>

> So the running count is:
>   Ayes to the left:   VB compatibility.
>   Nays to the right:  QuadIO, Perl, Dijkstra paper.
>
> The nays have it!

One-based indexing would also Python more compatible with Fortran,
Matlab/Octave/Scilab, and S (the language of S-Plus and R). It appears
that engineers, scientists, and statisticians, as opposed to
professional programmers, like 1-based indexing. An obvious argument
for 1-based indexing in the FORmula TRANslation programming language
is that formulas involving arrays in textbooks almost always use 1-
based indexing.

Since Python has always had 0-based indexing and since a user-defined
base can cause problems, as has been discussed, I think Python and
extensions such as NumPy should be left as is.




More information about the Python-list mailing list