Rewrite sentence one last time
This commit is contained in:
parent
e73d696f8c
commit
f58398d6e3
|
@ -70,7 +70,7 @@ For most PyO3 usage the conversion cost is worth paying to get these benefits. A
|
|||
|
||||
When returning values from functions callable from Python, Python-native types (`&PyAny`, `&PyDict` etc.) can be used with zero cost.
|
||||
|
||||
Because these types are references, in some situations the Rust compiler may ask for lifetime annotations. If this is the case, you should use `Py<PyAny>`, `Py<PyDict>` etc. instead - which are also zero-cost. `Py<T>` for all Python-native types can be created from `T` with an `.into()` conversion.
|
||||
Because these types are references, in some situations the Rust compiler may ask for lifetime annotations. If this is the case, you should use `Py<PyAny>`, `Py<PyDict>` etc. instead - which are also zero-cost. For all of these Python-native types `T`, `Py<T>` can be created from `T` with an `.into()` conversion.
|
||||
|
||||
If your function is fallible, it should return `PyResult<T>`, which will raise a `Python` exception if the `Err` variant is returned.
|
||||
|
||||
|
|
Loading…
Reference in a new issue