docs: fix typo in method name

This commit is contained in:
Azat Ibrakov 2023-02-18 21:51:16 +01:00
parent 3b2c175f8d
commit 9f7368922f
2 changed files with 2 additions and 1 deletions

View File

@ -148,7 +148,7 @@ The ways to convert a Rust function into a Python object vary depending on the f
- Named functions, e.g. `fn foo()`: add `#[pyfunction]` and then use [`wrap_pyfunction!`] to get the corresponding [`PyCFunction`].
- Anonymous functions (or closures), e.g. `foo: fn()` either:
- use a `#[pyclass]` struct which stores the function as a field and implement `__call__` to call the stored function.
- use `PyFunction::new_closure` to create an object directly from the function.
- use `PyCFunction::new_closure` to create an object directly from the function.
[`PyAny::is_callable`]: {{#PYO3_DOCS_URL}}/pyo3/struct.PyAny.html#tymethod.is_callable
[`PyAny::call`]: {{#PYO3_DOCS_URL}}/pyo3/struct.PyAny.html#tymethod.call

View File

@ -0,0 +1 @@
Fix docs about creating `Python` function from `Rust` one.