MCPcopy Create free account
hub / github.com/dgrunwald/rust-cpython / del_item

Method del_item

src/objectprotocol.rs:318–325  ·  view source on GitHub ↗
(&self, py: Python, key: K)

Source from the content-addressed store, hash-verified

316 /// This is equivalent to the Python expression 'del self[key]'.
317 #[inline]
318 fn del_item<K>(&self, py: Python, key: K) -> PyResult<()>
319 where
320 K: ToPyObject,
321 {
322 key.with_borrowed_ptr(py, |key| unsafe {
323 err::error_on_minusone(py, ffi::PyObject_DelItem(self.as_ptr(), key))
324 })
325 }
326
327 /// Takes an object and returns an iterator for it.
328 /// This is typically a new iterator but if the argument

Callers

nothing calls this directly

Implementers 1

objectprotocol.rssrc/objectprotocol.rs

Calls 3

error_on_minusoneFunction · 0.85
with_borrowed_ptrMethod · 0.45
as_ptrMethod · 0.45

Tested by

no test coverage detected