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

Method delattr

src/objectprotocol.rs:76–83  ·  view source on GitHub ↗
(&self, py: Python, attr_name: N)

Source from the content-addressed store, hash-verified

74 /// This is equivalent to the Python expression 'del self.attr_name'.
75 #[inline]
76 fn delattr<N>(&self, py: Python, attr_name: N) -> PyResult<()>
77 where
78 N: ToPyObject,
79 {
80 attr_name.with_borrowed_ptr(py, |attr_name| unsafe {
81 err::error_on_minusone(py, ffi::PyObject_DelAttr(self.as_ptr(), attr_name))
82 })
83 }
84
85 /// Compares two Python objects.
86 ///

Callers

nothing calls this directly

Implementers 1

objectprotocol.rssrc/objectprotocol.rs

Calls 4

error_on_minusoneFunction · 0.85
PyObject_DelAttrFunction · 0.50
with_borrowed_ptrMethod · 0.45
as_ptrMethod · 0.45

Tested by

no test coverage detected