classification
Title: IndexError: Add bad index to msg
Type: enhancement Stage: test needed
Components: Library (Lib) Versions: Python 3.2
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, Reflejo, mkleehammer
Priority: normal Keywords:

Created on 2006-08-04 14:40 by mkleehammer, last changed 2010-08-24 19:58 by BreamoreBoy.

Messages (3)
msg61250 - (view) Author: Michael Kleehammer (mkleehammer) Date: 2006-08-04 14:40
It would be very helpful to add more information to the
IndexErrors raised by the built-in classes.

Today, these errors look like:

  IndexError: list index out of range

When these occur, I usually have to add print
statements before the error and reproduce the problem
to determine what has gone wrong.  

If the list and tuple classes add the requested index
and the length of the structure, it would help a lot. 
Below is a suggestion:

  IndexError: list index 30 out of range; len=27

msg68521 - (view) Author: Martín Conte Mac Donell (Reflejo) Date: 2008-06-21 17:33
I don't think this is bearly needed. This error messages (IndexError:
list index out of range) comes from so long ago that those kind of
changes makes me feel worried.
msg114811 - (view) Author: Mark Lawrence (BreamoreBoy) Date: 2010-08-24 19:58
Is this ever likely to happen, it's already been closed and reopened once?
History
Date User Action Args
2010-08-24 19:58:54BreamoreBoysetnosy: + BreamoreBoy

messages: + msg114811
versions: - Python 2.7
2009-05-13 22:33:41ajaksu2setstage: test needed
versions: + Python 2.7, Python 3.2, - Python 2.6
2008-06-23 00:43:19benjamin.petersonsetstatus: closed -> open
resolution: invalid ->
2008-06-23 00:43:00benjamin.petersonsetstatus: open -> closed
resolution: invalid
2008-06-21 17:33:46Reflejosetnosy: + Reflejo
messages: + msg68521
2006-08-04 14:40:26mkleehammercreate