(&self, py: Python, attr_name: N)
| 47 | /// This is equivalent to the Python expression 'self.attr_name'. |
| 48 | #[inline] |
| 49 | fn getattr<N>(&self, py: Python, attr_name: N) -> PyResult<PyObject> |
| 50 | where |
| 51 | N: ToPyObject, |
| 52 | { |
| 53 | attr_name.with_borrowed_ptr(py, |attr_name| unsafe { |
| 54 | err::result_from_owned_ptr(py, ffi::PyObject_GetAttr(self.as_ptr(), attr_name)) |
| 55 | }) |
| 56 | } |
| 57 | |
| 58 | /// Sets an attribute value. |
| 59 | /// This is equivalent to the Python expression 'self.attr_name = value'. |
no test coverage detected