Replies: 2 comments 5 replies
-
I think we would need a |
Beta Was this translation helpful? Give feedback.
4 replies
-
I also hit this today. I expected that Did any progress ever get made on this? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm surprised that the following example fails with:
Error: KeyError: 'b'
. Shouldn't fieldb
automatically becomeNone
given that it doesn't exist in the Python dict?Also, is there a way for me to make this field "truly" optional? I'm trying to support some backwards and forwards compatibility on a python API and it's not guaranteed that all past fields will be present. I wanted to use
FromPyObject
andfrom_item_all
so I would avoid writing for every field a parsing function with#[pyo3(from_py_with = "my_parser")]
.Is it possible to universally make optional fields?
Beta Was this translation helpful? Give feedback.
All reactions