From: MRAB on
Default User wrote:
> Not to prolong a good "food fight", but IIRC, many years ago in QBasic,
> one could choose
>
> OPTION BASE 0
>
> or
>
> OPTION BASE 1
>
> to make arrays start with element [0] or element [1], respectively.
> Could such a feature be added to Python without significantly bloating
> the interpreter?
>
> Then, if starting with [0] "works for you", nothing really changes. And
> if starting with [1] "works for you", then you are not made to feel like
> a second-class citizen, and about as welcome as a dimwit at the Mensa
> meeting.
>
If you changed the base then you'd break the standard library, unless
everyone altered their code to compensate.

It's all part of learning a programming language. Some have 0-based
indexing, others have 1-based indexing; some have mutable strings,
others have immutable strings, still others don't have 'proper' strings.
Just learn to adapt.
From: Thomas Jollans on
On 2010-08-08 05:18, Dennis Lee Bieber wrote:
> Was it this thread where I commented that many early BASICs would
> allocate an eleven element array on
>
> DIM A(10)
VB.net does this -- to cater for the classic VB programmer who is used
to being able to index the number in brackets, and the .net framework,
which uses 0-based indexing (as everything else would look silly in C#,
or, especially, in C++/CLI.

From: saeed.gnu on
> > 1)  Why do Python lists start with element [0], instead of element
> > [1]?  "Common sense" would seem to suggest that lists should start
> > with [1].  

Because Zero is the neutral element of addition operation. And indexes
(and all adresses in computing) involve with addition much more than
multiplication! That's too clear i think and that's silly to use One
as first index of arrays/lists in a programming language!
From: Terry Reedy on
On 8/9/2010 11:16 AM, Grant Edwards wrote:

> IOW, the "Ugly American".
[snip hate rant]

Stereotypically bashing "Americans" is as ugly and obnoxious as bashing
any other ethnic group. I have traveled the world and Americans are no
worse, but are pretty much the same mix of good and bad. It is certainly
off-topic and inappropriate for this group.

--
Terry Jan Reedy

From: Grant Edwards on
On 2010-08-09, Terry Reedy <tjreedy(a)udel.edu> wrote:
> On 8/9/2010 11:16 AM, Grant Edwards wrote:
>
>> IOW, the "Ugly American".
> [snip hate rant]
>
> Stereotypically bashing "Americans"

I wasn't bashing "Americans". I was making light of a certain type of
American tourist commonly denoted by the phrase "ugly american".

> is as ugly and obnoxious as bashing any other ethnic group. I have
> traveled the world and Americans are no worse, but are pretty much
> the same mix of good and bad.

I've travelled the world as well, and I think that Americans do indeed
make worse "tourists" than most others. I've seen a lot of European
and Asian tourists in the US, and I've never seen from them the types
of behavior for which the "Ugly American" tourists is famous.

I've never been confronted here in the US by a Japanese tourist who
thought that if he spoke Japanese to a store clerk loudly and slowing
the clerk would understand. I've never seen European tourists trying
to avoid eating "American" food or complaining about the electrical
outlets.

> It is certainly off-topic and inappropriate for this group.

To that I'll confess.

--
Grant Edwards grant.b.edwards Yow! I feel ... JUGULAR ...
at
gmail.com