0c12d9137f
* port `Python::import` to `Bound` API * tidy up imports in tests/test_datetime_import.rs --------- Co-authored-by: David Hewitt <mail@davidhewitt.dev>
7 lines
158 B
Rust
7 lines
158 B
Rust
use pyo3::Python;
|
|
|
|
fn main() {
|
|
let foo = if true { "foo" } else { "bar" };
|
|
Python::with_gil(|py| py.import_bound(pyo3::intern!(py, foo)).unwrap());
|
|
}
|