From 6583da780355f6096d38fc55cb2b781bf2286034 Mon Sep 17 00:00:00 2001 From: konstin Date: Tue, 29 Nov 2022 19:34:20 +0100 Subject: [PATCH] Update guide/src/class/optional_bindings.md Co-authored-by: Georg Brandl --- guide/src/class/optional_bindings.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guide/src/class/optional_bindings.md b/guide/src/class/optional_bindings.md index c60849642b8..24c669b7296 100644 --- a/guide/src/class/optional_bindings.md +++ b/guide/src/class/optional_bindings.md @@ -1,6 +1,6 @@ # Optional bindings -You might want to write a library the is usable both in pure rust and as a python library. For that, pyo3 support wrapping attributes in `#[cfg_attr(feature = "pyo3", ...)]` (the feature unfortunately has to be hardcoded, so the feature must be named `pyo3`). This does not only apply to classes and their methods but also to e.g. `#[pyfunction]`. +You might want to write a library the is usable both in pure Rust and as a Python library. For that, PyO3 supports wrapping attributes in `#[cfg_attr(feature = "pyo3", ...)]` (the feature name unfortunately has to be hardcoded, so the feature must be named `pyo3`). This does not only apply to classes and their methods but also to e.g. `#[pyfunction]`. Make pyo3 optional in Cargo.toml: