Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
gh-87106: Fixinspect.signature.bind
handling of positional-only arguments with**kwargs
#103404
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…nly arguments with `**kwargs`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks!
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
👋@sobolevn would you be interested to take another look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I agree with the fix in general. However, there are still some things to polish and improve :)
Thanks a lot for your work!
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Uh oh!
There was an error while loading.Please reload this page.
jacobtylerwalls commentedMay 5, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Thanks for your suggestions,@sobolevn. Should I move some of the new cases to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@serhiy-storchaka do you have any additional feedback?
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM.
Thanks@jacobtylerwalls for the PR, and@serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Thanks@jacobtylerwalls for the PR, and@serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…nly arguments with **kwargs (pythonGH-103404)(cherry picked from commit9c15202)Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
…nly arguments with **kwargs (pythonGH-103404)(cherry picked from commit9c15202)Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
GH-118984 is a backport of this pull request to the3.12 branch. |
GH-118985 is a backport of this pull request to the3.13 branch. |
…nly arguments with **kwargs (pythonGH-103404)
Uh oh!
There was an error while loading.Please reload this page.
gh-87106
Closes#87106
If a function signature has a variadic keyword argument (like
**kwargs
), then providing a keyword with the same name as a positional-only argument will still succeed, and become available onkwargs
.Before
inspect.signature(f).bind(pos_only='val')
might either:Now
These are fixed.
Prior related work
#16800