Python "why" questions

MRAB python at mrabarnett.plus.com
Sun Aug 8 14:05:19 EDT 2010


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.



More information about the Python-list mailing list