-
Notifications
You must be signed in to change notification settings - Fork 3
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
Support calling functions with named args #24
Conversation
|
||
// Handle named arguments. | ||
let py_kwargs = PyDict::new(py); | ||
for name in args.names_map()?.iter() { |
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 was unable to use map
here due to my lack of knowledge with Rust.
src/lib.rs
Outdated
.collect::<PyResult<Vec<PyObject>>>()?; | ||
|
||
// Handle named arguments. | ||
let py_kwargs = PyDict::new(py); |
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 could not understand why new_bound
does not work.
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.
new_bound
is for a newer version of pyo3 than this package was on. It's there now.
ac358b6
to
0f93f42
Compare
0f93f42
to
93e4a19
Compare
Awesome, thank you for your help @inducer! May I ask for a new release, if that is possible? 😇 |
Sure thing. https://github.com/inducer/starlark-pyo3/releases/tag/v2024.1.5 Here's the build that should eventually upload the release to the package index: https://github.com/inducer/starlark-pyo3/actions/runs/12167634055 |
This is a minimal PR to fix #22. I'm not familiar at all with Rust, my coding style may hence not be optimal.