pub fn is_true(&self, py: Python) -> PyResult<bool> {
        let v = unsafe { ffi::PyObject_IsTrue(self.as_ptr()) };
        if v == -1 {
            Err(PyErr::fetch(py))
        } else {
            Ok(v != 0)
        }
    }
/// Returns whether the object is considered to be true.
/// This is equivalent to the Python expression: 'not not self'
Returns whether the object is considered to be true.
This is equivalent to the Python expression: 'not not self'
Returns whether the object is considered to be true . This is equivalent to the Python expression : ' not not self '
pub fn is_true(&self, py: Python) -> PyResult<bool> {
        let v = unsafe { ffi::PyObject_IsTrue(self.as_ptr()) };
        if v == -1 {
            Err(PyErr::fetch(py))
        } else {
            Ok(v != 0)
        }
    }
pub fn is_true ( & self , py : Python ) -> PyResult < bool > { let v = unsafe { ffi :: PyObject_IsTrue ( self . as_ptr ( ) ) } ; if v == - 1 { Err ( PyErr :: fetch ( py ) ) } else { Ok ( v != 0 ) } }
Returns whether the object is considered to be true.
Returns whether the object is considered to be true .
&self
py
Python
&self
py
Python