Why Python does *SLICING* the way it does??

Antoon Pardon apardon at forel.vub.ac.be
Wed Apr 20 09:58:25 EDT 2005


Op 2005-04-20, Roy Smith schreef <roy at panix.com>:
> Antoon Pardon <apardon at forel.vub.ac.be> wrote:
>
>> Personnaly I would like to have the choice. Sometimes I prefer to
>> start at 0, sometimes at 1 and other times at -13 or +7.
>
> Argggh.  Having two (or more!) ways to do it, would mean that every time I 
> read somebody else's code, I would have to figure out which flavor they are 
> using before I could understand what their code meant.  That would be evil.

This is nonsens. table[i] = j, just associates value j with key i.
That is the same independend from whether the keys can start from
0 or some other value. Do you also consider it more ways because
the keys can end in different values?

-- 
Antoon Pardon



More information about the Python-list mailing list