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

Method getitem_inner

crates/stdlib/src/array.rs:987–992  ·  view source on GitHub ↗
(&self, needle: &PyObject, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

985 }
986
987 fn getitem_inner(&self, needle: &PyObject, vm: &VirtualMachine) -> PyResult {
988 match SequenceIndex::try_from_borrowed_object(vm, needle, "array")? {
989 SequenceIndex::Int(i) => self.read().getitem_by_index(i, vm),
990 SequenceIndex::Slice(slice) => self.read().getitem_by_slice(slice, vm),
991 }
992 }
993
994 fn __getitem__(&self, needle: PyObjectRef, vm: &VirtualMachine) -> PyResult {
995 self.getitem_inner(&needle, vm)

Callers 1

__getitem__Method · 0.45

Calls 3

getitem_by_indexMethod · 0.45
readMethod · 0.45
getitem_by_sliceMethod · 0.45

Tested by

no test coverage detected