pub fn import_module<M>(module: M) -> ImportModule
Expand description
The import of a Python module import module
.
ยงExamples
use genco::prelude::*;
let toks = quote! {
$(python::import_module("collections"))
$(python::import_module("collections").with_alias("c"))
};
assert_eq!(
vec![
"import collections",
"import collections as c",
"",
"collections",
"c",
],
toks.to_file_vec()?
);