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

Method keys_vec

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

Returns all keys 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

128 /// Returns all keys as a Vec, atomically under a single read lock.
129 /// Thread-safe: prevents "dictionary changed size during iteration" errors.
130 pub fn keys_vec(&self) -> Vec<PyObjectRef> {
131 self.entries.keys()
132 }
133
134 /// Returns all values as a Vec, atomically under a single read lock.
135 /// Thread-safe: prevents "dictionary changed size during iteration" errors.

Callers 1

extract_elements_withMethod · 0.80

Calls 1

keysMethod · 0.45

Tested by

no test coverage detected