Consider cleanup of type for iterator variables bounded by asdl_seq_LEN
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 36k
- PR merge metrics
- PR metrics pending
Description
Feature or enhancement
It looks like the asdl_seq_LEN macro's "return type" is Py_ssize_t. Throughout the code, the type of the variable compared against a value "returned" by the macro are variously
int or
Py_ssize_t
Pitch
I am not sure, but it seems like it would be good to be consistent throughout the code base. If this is something that seems reasonable or valuable, I would be happy to take on the task!
Previous discussion
No previous discussion, however I searched prior issues and see nothing noting something similar.
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 locating the asdl_seq_LEN macro and reviewing its uses where iterator variables are compared with its result. Identify the affected variables typed as int or Py_ssize_t, then check the relevant existing tests after making the types consistent throughout the codebase.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100