[BUG] second pass for conversions does not handle keyword-only arguments
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 18k
- Forks
- 2.3k
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 10
Description
It appears that the overload resolution logic that attempts a second pass with convert=true does not properly handle keyword-only arguments:
The check there only considers positional arguments. So if you only have keyword-only arguments, a second pass is not attempted.
Is there some reason for that behavior, or should it be changed to also consider keyword arguments?
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 at include/pybind11/pybind11.h around line 780 and trace the overload-resolution second pass with convert=true. Reproduce the case involving only keyword-only arguments, then verify that the second pass is attempted and that the conversion behavior is correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100