From ab7a65cbb52642879af498f8af8c247b798aae6c Mon Sep 17 00:00:00 2001 From: Luca Trevisani Date: Fri, 16 Jun 2023 23:45:49 +0200 Subject: [PATCH] Improve `PyModule::from_code` examples --- src/types/module.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/module.rs b/src/types/module.rs index f728d782..b6b25eac 100644 --- a/src/types/module.rs +++ b/src/types/module.rs @@ -98,7 +98,7 @@ impl PyModule { /// let code = include_str!("../../assets/script.py"); /// /// Python::with_gil(|py| -> PyResult<()> { - /// PyModule::from_code(py, code, "example", "example")?; + /// PyModule::from_code(py, code, "example.py", "example")?; /// Ok(()) /// })?; /// # Ok(()) @@ -117,7 +117,7 @@ impl PyModule { /// let code = std::fs::read_to_string("assets/script.py")?; /// /// Python::with_gil(|py| -> PyResult<()> { - /// PyModule::from_code(py, &code, "example", "example")?; + /// PyModule::from_code(py, &code, "example.py", "example")?; /// Ok(()) /// })?; /// Ok(())