(&self, py: Python, key: K, value: V)
| 301 | /// This is equivalent to the Python expression 'self[key] = value'. |
| 302 | #[inline] |
| 303 | fn set_item<K, V>(&self, py: Python, key: K, value: V) -> PyResult<()> |
| 304 | where |
| 305 | K: ToPyObject, |
| 306 | V: ToPyObject, |
| 307 | { |
| 308 | key.with_borrowed_ptr(py, move |key| { |
| 309 | value.with_borrowed_ptr(py, |value| unsafe { |
| 310 | err::error_on_minusone(py, ffi::PyObject_SetItem(self.as_ptr(), key, value)) |
| 311 | }) |
| 312 | }) |
| 313 | } |
| 314 | |
| 315 | /// Deletes an item. |
| 316 | /// This is equivalent to the Python expression 'del self[key]'. |
nothing calls this directly
no test coverage detected