(&self, py: Python, attr_name: N)
| 35 | /// This is equivalent to the Python expression 'hasattr(self, attr_name)'. |
| 36 | #[inline] |
| 37 | fn hasattr<N>(&self, py: Python, attr_name: N) -> PyResult<bool> |
| 38 | where |
| 39 | N: ToPyObject, |
| 40 | { |
| 41 | attr_name.with_borrowed_ptr(py, |attr_name| unsafe { |
| 42 | Ok(ffi::PyObject_HasAttr(self.as_ptr(), attr_name) != 0) |
| 43 | }) |
| 44 | } |
| 45 | |
| 46 | /// Retrieves an attribute value. |
| 47 | /// This is equivalent to the Python expression 'self.attr_name'. |
nothing calls this directly
no test coverage detected