add call_bound and call_method_bound#3711
Merged
davidhewitt merged 1 commit intoPyO3:mainfrom Jan 3, 2024
Merged
Conversation
davidhewitt
commented
Dec 29, 2023
Member
Author
|
Uff will fixup doctests later, ideally this evening. |
bfdd0a7 to
a9ac3db
Compare
Member
Author
|
(This one is ready for review as far as I'm concerned; the doctests look to be passing now 🎉) |
adamreichold
reviewed
Jan 3, 2024
adamreichold
reviewed
Jan 3, 2024
a9ac3db to
617b755
Compare
adamreichold
approved these changes
Jan 3, 2024
617b755 to
50e33d8
Compare
CodSpeed Performance ReportMerging #3711 will improve performances by 10.08%Comparing 🎉 Hooray!
|
| Benchmark | main |
davidhewitt:call-bound |
Change | |
|---|---|---|---|---|
| ⚡ | list_via_extract |
303.3 ns | 275.6 ns | +10.08% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
Py::call_boundandPy::call_method_bound, which takekwargs: Option<&Bound<'_, PyDict>>.For
&PyAny, I decided not to add these new variants as instead the correct change should be to switch toBound<'_, PyAny>.Similarly I changed the argument in
PyAnyMethods::callandPyAnyMethods::call_methodwithout introducing new variants.The other functions like
call0don't need changing as they don't take anOption<&PyDict>argument.