MCPcopy Index your code
hub / github.com/RustPython/RustPython / _delitem

Method _delitem

crates/vm/src/builtins/list.rs:383–388  ·  view source on GitHub ↗
(&self, needle: &PyObject, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

381 }
382
383 fn _delitem(&self, needle: &PyObject, vm: &VirtualMachine) -> PyResult<()> {
384 match SequenceIndex::try_from_borrowed_object(vm, needle, "list")? {
385 SequenceIndex::Int(i) => self.borrow_vec_mut().delitem_by_index(vm, i),
386 SequenceIndex::Slice(slice) => self.borrow_vec_mut().delitem_by_slice(vm, slice),
387 }
388 }
389
390 fn __delitem__(&self, subscript: PyObjectRef, vm: &VirtualMachine) -> PyResult<()> {
391 self._delitem(&subscript, vm)

Callers 1

__delitem__Method · 0.45

Calls 3

delitem_by_indexMethod · 0.80
borrow_vec_mutMethod · 0.80
delitem_by_sliceMethod · 0.80

Tested by

no test coverage detected