-
-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-44110: Improve string's __getitem__ error message #26042
Conversation
This PR is stale because it has been open for 30 days with no activity. |
A similar enhancement to list IndexError msg was recently rejected for performance reasons. I wonder if the same objection may apply here (most likely less so because the same pattern of catching index errors in a loop would be used rarely with strings). I will try to check performance later today, though I was having some odd issues with pyperf (but this may be a good chance to debug them :) ). related issue: |
After looking at the pattern that was an issue with the list IndexError, it should not apply to strings, so please ignore my comment! |
Yes, because it is a TypeError, not IndexError. |
https://bugs.python.org/issue44110