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

Method _send

crates/vm/src/frame.rs:6804–6819  ·  view source on GitHub ↗
(
        &self,
        jen: &PyObject,
        val: PyObjectRef,
        vm: &VirtualMachine,
    )

Source from the content-addressed store, hash-verified

6802 }
6803
6804 fn _send(
6805 &self,
6806 jen: &PyObject,
6807 val: PyObjectRef,
6808 vm: &VirtualMachine,
6809 ) -> PyResult<PyIterReturn> {
6810 match self.builtin_coro(jen) {
6811 Some(coro) => coro.send(jen, val, vm),
6812 // TODO: turn return type to PyResult<PyIterReturn> then ExecutionResult will be simplified
6813 None if vm.is_none(&val) => PyIter::new(jen).next(vm),
6814 None => {
6815 let meth = jen.get_attr("send", vm)?;
6816 PyIterReturn::from_pyresult(meth.call((val,), vm), vm)
6817 }
6818 }
6819 }
6820
6821 fn execute_unpack_ex(&mut self, vm: &VirtualMachine, before: u8, after: u8) -> FrameResult {
6822 let (before, after) = (before as usize, after as usize);

Callers 1

execute_instructionMethod · 0.45

Calls 7

newFunction · 0.85
builtin_coroMethod · 0.80
sendMethod · 0.45
is_noneMethod · 0.45
nextMethod · 0.45
get_attrMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected