This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients Spencer Brown, aroberge, miguendes, mishra.akash.myself, pablogsal, remi.lapeyre, rhettinger, serhiy.storchaka
Date 2021-12-05.21:17:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1638739055.31.0.995311007709.issue44166@roundup.psfhosted.org>
In-reply-to
Content
I also share Serhiy's concerns and prefer that it be left as-is.

Conceptually, adding more information in the error message would make it more useful for debugging, but in practice, it would rarely be helpful.  In teaching and coaching Python, I've learned that the intended, dominant effect of seeing "IndexError: list index out of range" is that a person understands that index is invalid because it is out of range.  That is a helpful dominant impression.  IMO it would be distracting and rarely helpful to focus on the specific index and length.  The important point is that a nonsense lookup was being made.
History
Date User Action Args
2021-12-05 21:17:35rhettingersetrecipients: + rhettinger, aroberge, serhiy.storchaka, Spencer Brown, pablogsal, remi.lapeyre, miguendes, mishra.akash.myself
2021-12-05 21:17:35rhettingersetmessageid: <1638739055.31.0.995311007709.issue44166@roundup.psfhosted.org>
2021-12-05 21:17:35rhettingerlinkissue44166 messages
2021-12-05 21:17:35rhettingercreate