[issue36200] display index on IndexError

Aditya Shankar report at bugs.python.org
Tue Mar 5 12:00:44 EST 2019


New submission from Aditya Shankar <aditniru at gmail.com>:

considering a list of 5 elements, if the 6th element is asked, the Interpreter would raise IndexError: list index out of range,
I think It'd be better if it actually said what the invalid index is

Improvement benefits:
*quicker debugging of faulty python code
*person debugging does not need to edit and restart the program to fix issue, sometimes at least

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36200>
_______________________________________


More information about the Python-bugs-list mailing list