[issue21911] "IndexError: tuple index out of range" should include the requested index and tuple length

Terry J. Reedy report at bugs.python.org
Sat Jul 5 04:28:01 CEST 2014


Terry J. Reedy added the comment:

I have several times found exception messages to be under-informative, and I am pretty sure this is one of them. The obvious use case is so I don't have to insert a print statement, which I can only do if the error is in Python code, to get the essential info that Python could have told me but didn't.

For for loops, StopIteration has mostly taken over the flow control job that IndexError did and only occasionally still does.

----------
nosy: +terry.reedy

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21911>
_______________________________________


More information about the Python-bugs-list mailing list