Python "why" questions

AK andrei.avk at gmail.com
Wed Aug 18 17:01:20 EDT 2010


On 08/17/2010 10:15 PM, Russ P. wrote:
> On Aug 7, 5:54 am, "D'Arcy J.M. Cain"<da... at druid.net>  wrote:
>
>> Would said beginner also be surprised that a newborn baby is zero years
>> old or would it be more natural to call them a one year old?  Zero
>> based counting is perfectly natural.
>
> You're confusing continuous and discrete variables. Time is a
> continuous variable, but a list index is discrete.
>
> Take a look at any numbered list, such as the top ten football teams
> or the top ten software companies. Have you ever seen such a list
> start with zero? If so, where? I sure haven't.
>
> When I studied linear algebra way back, vector and matrix indices also
> always started with one, and I assume they still do.
>
> The convention of starting with zero may have had some slight
> performance advantage in the early days of computing, but the huge
> potential for error that it introduced made it a poor choice in the
> long run, at least for high-level languages.

Besides that, the way things are now, it's almost an Abbot & Costello
routine:

- How many folders are there?
- 5
- Ok, give me the fourth one.
- Here.
- No, that's the last one!
- That's what you said!
- No, I said, fourth one!
- That's what I did!
- How many are there in all?
- I already said, five!
- You gave me the last one!!
- Just like you said - fourth!!!!



More information about the Python-list mailing list