Better `TypeError` message when a string is indexed using a non int
Open
Nobody has claimed this yet.
3.9 (EOL)
stdlib
type-feature
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 36k
- PR merge metrics
- PR metrics pending
Description
| BPO | 45284 |
|---|---|
| Nosy | @tirkarthi |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = None
closed_at = None
created_at = <Date 2021-09-24.16:33:24.005>
labels = ['type-feature', 'library', '3.9']
title = 'Better `TypeError` message when a string is indexed using a non int'
updated_at = <Date 2021-09-24.17:28:19.493>
user = 'https://bugs.python.org/Rin'
bugs.python.org fields:
activity = <Date 2021-09-24.17:28:19.493>
actor = 'xtreak'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2021-09-24.16:33:24.005>
creator = 'Rin'
dependencies = []
files = []
hgrepos = []
issue_num = 45284
keywords = []
message_count = 2.0
messages = ['402577', '402578']
nosy_count = 2.0
nosy_names = ['xtreak', 'Rin']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue45284'
versions = ['Python 3.9']
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing string indexing with a non-integer index in CPython and inspect the existing TypeError path for this operation. The work is done when the resulting error message gives more useful information while preserving the expected failure behavior; the issue does not name a source file or test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100