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

Method extend

crates/vm/src/builtins/list.rs:188–192  ·  view source on GitHub ↗
(&self, x: PyObjectRef, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

186
187 #[pymethod]
188 pub(crate) fn extend(&self, x: PyObjectRef, vm: &VirtualMachine) -> PyResult<()> {
189 let mut new_elements = x.try_to_value(vm)?;
190 self.borrow_vec_mut().append(&mut new_elements);
191 Ok(())
192 }
193
194 #[pymethod]
195 pub(crate) fn insert(&self, position: isize, element: PyObjectRef) {

Callers 13

capitalizeMethod · 0.45
titleMethod · 0.45
do_slice_reverseMethod · 0.45
do_stepped_sliceMethod · 0.45
flatten_argsFunction · 0.45
reduce_newobjFunction · 0.45
clearMethod · 0.45
clearMethod · 0.45
concatMethod · 0.45
__reduce__Method · 0.45

Calls 3

try_to_valueMethod · 0.80
borrow_vec_mutMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected