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

Method send_none

crates/vm/src/coroutine.rs:146–158  ·  view source on GitHub ↗
(&self, jen: &PyObject, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

144 }
145
146 pub(crate) fn send_none(&self, jen: &PyObject, vm: &VirtualMachine) -> PyResult<PyIterReturn> {
147 if self.closed.load() {
148 return Ok(PyIterReturn::StopIteration(None));
149 }
150 self.frame.locals_to_fast(vm)?;
151 let value = if self.frame.lasti() > 0 {
152 Some(vm.ctx.none())
153 } else {
154 None
155 };
156 let result = self.run_with_context(jen, vm, |f| f.resume(value, vm));
157 self.finalize_send_result(jen, result, vm)
158 }
159
160 pub fn send(
161 &self,

Callers 1

execute_instructionMethod · 0.80

Calls 8

locals_to_fastMethod · 0.80
lastiMethod · 0.80
noneMethod · 0.80
run_with_contextMethod · 0.80
finalize_send_resultMethod · 0.80
SomeClass · 0.50
loadMethod · 0.45
resumeMethod · 0.45

Tested by

no test coverage detected