diff --git a/guide/src/migration.md b/guide/src/migration.md index 6cd6e2f177b..6996f9a9b9d 100644 --- a/guide/src/migration.md +++ b/guide/src/migration.md @@ -51,6 +51,7 @@ use pyo3::types::PyString; #[pyclass] struct MyClass { } +#[pymethods] impl MyClass { fn __str__(&self) -> &'static [u8] { b"hello, world"