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

Method items_vec

crates/vm/src/builtins/dict.rs:142–144  ·  view source on GitHub ↗

Returns all items as a Vec, atomically under a single read lock. Thread-safe: prevents "dictionary changed size during iteration" errors.

(&self)

Source from the content-addressed store, hash-verified

140 /// Returns all items as a Vec, atomically under a single read lock.
141 /// Thread-safe: prevents "dictionary changed size during iteration" errors.
142 pub fn items_vec(&self) -> Vec<(PyObjectRef, PyObjectRef)> {
143 self.entries.items()
144 }
145
146 // Used in update and ior.
147 pub(crate) fn merge_object(&self, other: PyObjectRef, vm: &VirtualMachine) -> PyResult<()> {

Callers 2

ast_replaceFunction · 0.80
extract_elements_withMethod · 0.80

Calls 1

itemsMethod · 0.45

Tested by

no test coverage detected