-
Notifications
You must be signed in to change notification settings - Fork 797
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add call_bound
and call_method_bound
#3711
Conversation
Uff will fixup doctests later, ideally this evening. |
bfdd0a7
to
a9ac3db
Compare
(This one is ready for review as far as I'm concerned; the doctests look to be passing now 🎉) |
a9ac3db
to
617b755
Compare
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% |
Adds
Py::call_bound
andPy::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::call
andPyAnyMethods::call_method
without introducing new variants.The other functions like
call0
don't need changing as they don't take anOption<&PyDict>
argument.