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

Method do_get

crates/vm/src/builtins/list.rs:455–457  ·  view source on GitHub ↗
(index: usize, inner: &[PyObjectRef])

Source from the content-addressed store, hash-verified

453 type Inner = [PyObjectRef];
454
455 fn do_get(index: usize, inner: &[PyObjectRef]) -> Option<&PyObject> {
456 inner.get(index).map(|r| r.as_ref())
457 }
458
459 fn do_lock(&self) -> impl core::ops::Deref<Target = [PyObjectRef]> {
460 self.borrow_vec()

Callers 1

_getitemMethod · 0.45

Calls 3

mapMethod · 0.45
getMethod · 0.45
as_refMethod · 0.45

Tested by

no test coverage detected