Russ wrote:

> Holy cow! I can't believe that many changes would be necessary unless
> the IndexError exception is scattered all over the place. I would hope
> that one well-placed change could fix the bulk of cases.

when you write x[i], the interpreter makes no assumptions about x and i 
and len(x); it just calls the corresponding method (__getitem__), either 
directly, or via a C-level internal slot.

there's no way to generate the error message you want in a single place 
without changing the semantics of x[i].

</F>

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to