You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation of FromPyObject mentioned the usage of #[pyo3(item)], however I think it's quite feasible to have a #[pyo3(item_all)] on structs, which collects every field with get_item.
Apart from that, the pythonize project also provided the ability to build structs from Python dictionary, which worths mentioniing in the documentation as an alternative solution. However using #[pyo3(item_all)] should be easier for nested structures.
I'll work on the implementation and come up with a PR if #[pyo3(item_all)] is appropriate for PyO3 to have.
The text was updated successfully, but these errors were encountered:
The documentation of
FromPyObject
mentioned the usage of#[pyo3(item)]
, however I think it's quite feasible to have a#[pyo3(item_all)]
on structs, which collects every field withget_item
.Apart from that, the
pythonize
project also provided the ability to build structs from Python dictionary, which worths mentioniing in the documentation as an alternative solution. However using#[pyo3(item_all)]
should be easier for nested structures.I'll work on the implementation and come up with a PR if
#[pyo3(item_all)]
is appropriate for PyO3 to have.The text was updated successfully, but these errors were encountered: