Skip to main content

parse_py_expr

Function parse_py_expr 

Source
pub fn parse_py_expr(s: &str) -> Result<PyExpr, PyExprError>
Expand description

Parse a whole string as one Python expression (ast.parse(s, mode='eval') for the supported subset). Trailing garbage is an error; so is anything outside the subset. Never panics.