IronLanguages / IronLanguages/ironpython3
review PythonOps.TryInvokeLengthHint implementation
Open
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2.8k
- Forks
- 316
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 1
Description
The PythonOps.TryInvokeLengthHint implementation is not quite correct. For example, we do not handle the following scenarios:
ensure__len__and__length_hint__are not negative__len__can return an index- don't fail if
TypeErroris thrown from__len__or__length_hint__ - ...
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 PythonOps.TryInvokeLengthHint implementation and inspect how it handles the listed len and length_hint scenarios. Compare its behavior with the stated Python semantics, including index results, negative values, and TypeError handling. Done means all listed cases behave correctly and are covered by the relevant tests, if present.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, python
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100