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

Method index

crates/stdlib/src/array.rs:900–908  ·  view source on GitHub ↗
(
            &self,
            x: PyObjectRef,
            range: OptionalRangeArgs,
            vm: &VirtualMachine,
        )

Source from the content-addressed store, hash-verified

898
899 #[pymethod]
900 fn index(
901 &self,
902 x: PyObjectRef,
903 range: OptionalRangeArgs,
904 vm: &VirtualMachine,
905 ) -> PyResult<usize> {
906 let (start, stop) = range.saturate(self.__len__(), vm)?;
907 self.read().index(x, start, stop, vm)
908 }
909
910 #[pymethod]
911 fn insert(zelf: &Py<Self>, i: isize, x: PyObjectRef, vm: &VirtualMachine) -> PyResult<()> {

Callers 2

if_nameindexFunction · 0.45
collation_callbackMethod · 0.45

Calls 3

saturateMethod · 0.80
__len__Method · 0.45
readMethod · 0.45

Tested by

no test coverage detected