diff --git a/pyargus/src/expr.rs b/pyargus/src/expr.rs index ef9a72b..a7a49b4 100644 --- a/pyargus/src/expr.rs +++ b/pyargus/src/expr.rs @@ -65,6 +65,10 @@ impl PyNumExpr { format!("{:?}", &self.0) } + fn __str__(&self) -> String { + format!("{}", self.0) + } + fn __neg__(&self) -> PyResult> { Python::with_gil(|py| Py::new(py, Negate::new(self.clone()))) } @@ -308,6 +312,10 @@ impl PyBoolExpr { format!("{:?}", &self.0) } + fn __str__(&self) -> String { + format!("{}", self.0) + } + fn __invert__(&self) -> PyResult> { Python::with_gil(|py| Py::new(py, Not::new(self.clone()))) }