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

Method del_slice

src/objects/sequence.rs:156–163  ·  view source on GitHub ↗
(&self, py: Python, i1: isize, i2: isize)

Source from the content-addressed store, hash-verified

154 /// equivalent of the Python statement `del o[i1:i2]`
155 #[inline]
156 pub fn del_slice(&self, py: Python, i1: isize, i2: isize) -> PyResult<()> {
157 unsafe {
158 err::error_on_minusone(
159 py,
160 ffi::PySequence_DelSlice(self.as_ptr(), i1 as Py_ssize_t, i2 as Py_ssize_t),
161 )
162 }
163 }
164
165 /// Return the number of occurrences of value in o, that is, return the number of keys for
166 /// which `o[key] == value`

Callers

nothing calls this directly

Calls 2

error_on_minusoneFunction · 0.85
as_ptrMethod · 0.45

Tested by

no test coverage detected