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

Method get_kwarg

crates/vm/src/function/argument.rs:214–219  ·  view source on GitHub ↗
(&self, key: &str, default: PyObjectRef)

Source from the content-addressed store, hash-verified

212 }
213
214 pub fn get_kwarg(&self, key: &str, default: PyObjectRef) -> PyObjectRef {
215 self.kwargs
216 .get(key)
217 .cloned()
218 .unwrap_or_else(|| default.clone())
219 }
220
221 pub fn get_optional_kwarg(&self, key: &str) -> Option<PyObjectRef> {
222 self.kwargs.get(key).cloned()

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected