Why not just show the out-of-range index?

Terry Reedy tjreedy at udel.edu
Mon Dec 4 16:32:56 EST 2006


"Russ" <uymqlp502 at sneakemail.com> wrote in message 
news:1165264641.125857.85980 at 80g2000cwy.googlegroups.com...
>
> Fredrik Lundh wrote:
>
>> > Sorry I haven't thought this through 100%
>>
>> obviously not.
>
> And you didn't like the "tone" of some of my earlier posts?

While Fredrik's reply is a bit short, as is sometimes his habit,
here are some things that appear to me to not have been thought through 
enough:
1. some negative indexes are legal.
2. replacing short inline code with a function call on *every* index lookup
will slow down the interpreter a bit.
3. will the same check code work for even all built-in sequences?
4. how does index checking fit in with slice checking?

By the way, it is already understood that error messages could be better, 
and I have thought about this one myself.  You are not the first to notice, 
and improvements occasionally get submitted (and later accepted) by people 
with both the knowledge and motivation to do so.  But insulting such people 
is not helpful.

Terry Jan Reedy






More information about the Python-list mailing list