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

Method collect_keyword_args

crates/vm/src/frame.rs:6435–6450  ·  view source on GitHub ↗
(&mut self, nargs: u32)

Source from the content-addressed store, hash-verified

6433 }
6434
6435 fn collect_keyword_args(&mut self, nargs: u32) -> FuncArgs {
6436 let kwarg_names = self
6437 .pop_value()
6438 .downcast::<PyTuple>()
6439 .expect("kwarg names should be tuple of strings");
6440 let args = self.pop_multiple(nargs as usize);
6441
6442 let kwarg_names = kwarg_names.as_slice().iter().map(|pyobj| {
6443 pyobj
6444 .downcast_ref::<PyUtf8Str>()
6445 .unwrap()
6446 .as_str()
6447 .to_owned()
6448 });
6449 FuncArgs::with_kwargs_names(args, kwarg_names)
6450 }
6451
6452 fn collect_ex_args(&mut self, vm: &VirtualMachine) -> PyResult<FuncArgs> {
6453 let kwargs_or_null = self.pop_value_opt();

Callers 1

execute_instrumentedMethod · 0.80

Calls 8

pop_valueMethod · 0.80
pop_multipleMethod · 0.45
mapMethod · 0.45
iterMethod · 0.45
as_sliceMethod · 0.45
to_ownedMethod · 0.45
as_strMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected