Skip to main content

Module expression

Module expression 

Source

Structs§

Container
Mostly this shouldn’t be used, but it exists so that we don’t have to manually implement FromPyObject on all of ExprType
Expr
An Expr only contains a single value key, which leads to the actual expression, which is one of several types.

Enums§

ExprType

Functions§

condition_to_rust
Lower an expression in condition position (if/while/ternary/assert tests): Python implicitly calls bool() on it. Boolean operators recurse into their operands and not negates a condition; comparisons already yield bool; anything else is wrapped in stdpython’s Truthy::is_truthy, giving Python’s truth table (empty string/collection and zero are false).