feat(pyargus): add __str__ methods for Expr
This commit is contained in:
parent
69daf21abe
commit
fb72e60a0a
1 changed files with 8 additions and 0 deletions
|
|
@ -65,6 +65,10 @@ impl PyNumExpr {
|
|||
format!("{:?}", &self.0)
|
||||
}
|
||||
|
||||
fn __str__(&self) -> String {
|
||||
format!("{}", self.0)
|
||||
}
|
||||
|
||||
fn __neg__(&self) -> PyResult<Py<Negate>> {
|
||||
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<Py<Not>> {
|
||||
Python::with_gil(|py| Py::new(py, Not::new(self.clone())))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue