Expand description
Specialization for Python code generation.
§Examples
String quoting in Python:
use genco::prelude::*;
let toks: python::Tokens = quote!("hello \n world");
assert_eq!("\"hello \\n world\"", toks.to_string()?);
let toks: python::Tokens = quote!($(quoted("hello \n world")));
assert_eq!("\"hello \\n world\"", toks.to_string()?);
Structs§
- Configuration for python.
- Formatting state for python.
- The import of a Python name
from module import foo
. - The import of a Python module
import module
. - Language specialization for Python.
Enums§
- A type-erased language item capable of holding any kind.
Functions§
- The import of a Python name
from module import foo
. - The import of a Python module
import module
.
Type Aliases§
- Tokens container specialization for Python.