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

Method __iadd__

crates/vm/src/builtins/bytearray.rs:239–248  ·  view source on GitHub ↗
(
        zelf: PyRef<Self>,
        other: ArgBytesLike,
        vm: &VirtualMachine,
    )

Source from the content-addressed store, hash-verified

237 }
238
239 fn __iadd__(
240 zelf: PyRef<Self>,
241 other: ArgBytesLike,
242 vm: &VirtualMachine,
243 ) -> PyResult<PyRef<Self>> {
244 zelf.try_resizable(vm)?
245 .elements
246 .extend(&*other.borrow_buf());
247 Ok(zelf)
248 }
249
250 fn __getitem__(&self, needle: PyObjectRef, vm: &VirtualMachine) -> PyResult {
251 self._getitem(&needle, vm)

Callers

nothing calls this directly

Calls 3

try_resizableMethod · 0.80
extendMethod · 0.45
borrow_bufMethod · 0.45

Tested by

no test coverage detected