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

Russ uymqlp502 at sneakemail.com
Sun Dec 3 19:38:25 EST 2006


Every Python programmer gets this message occasionally:

IndexError: list index out of range

The message tells you where the error occurred, but it doesn't tell you
what the range and the offending index are. Why does it force you to
determine that information for yourself when it could save you a step
and just tell you? This seems like a "no-brainer" to me. Am I missing
something?




More information about the Python-list mailing list