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§
- Any
- A type-erased language item capable of holding any kind.
- Config
- Configuration for python.
- Format
- Formatting state for python.
- Import
- The import of a Python name
from module import foo. - Import
Module - The import of a Python module
import module. - Python
- Language specialization for Python.
Functions§
- import
- The import of a Python name
from module import foo. - import_
module - The import of a Python module
import module.
Type Aliases§
- Tokens
- Tokens container specialization for Python.