From 3bf2f1f4b412c6d5eafb1308c682a314e88919e1 Mon Sep 17 00:00:00 2001 From: Alexander Kuhn-Regnier Date: Sat, 3 Aug 2024 11:57:03 +0100 Subject: [PATCH] Fix Typo in types.md (#4416) Fixes a typo in `types.md` regarding the use of the `Bound<'py, T>` smart pointer. --- guide/src/types.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guide/src/types.md b/guide/src/types.md index 131cb0ed119..bbeb1dae9df 100644 --- a/guide/src/types.md +++ b/guide/src/types.md @@ -32,7 +32,7 @@ The lack of binding to the `'py` lifetime also carries drawbacks: - Almost all methods on `Py` require a `Python<'py>` token as the first argument - Other functionality, such as [`Drop`][Drop], needs to check at runtime for attachment to the Python GIL, at a small performance cost -Because of the drawbacks `Bound<'py, T>` is preferred for many of PyO3's APIs. In particular, `Bound<'py, T>` is the better for function arguments. +Because of the drawbacks `Bound<'py, T>` is preferred for many of PyO3's APIs. In particular, `Bound<'py, T>` is better for function arguments. To convert a `Py` into a `Bound<'py, T>`, the `Py::bind` and `Py::into_bound` methods are available. `Bound<'py, T>` can be converted back into `Py` using [`Bound::unbind`].