(self, vm: &VirtualMachine)
| 190 | } |
| 191 | |
| 192 | pub fn into_async_pyresult(self, vm: &VirtualMachine) -> PyResult { |
| 193 | match self { |
| 194 | Self::Return(obj) => Ok(obj), |
| 195 | Self::StopIteration(v) => Err({ |
| 196 | let args = if let Some(v) = v { vec![v] } else { Vec::new() }; |
| 197 | vm.new_exception(vm.ctx.exceptions.stop_async_iteration.to_owned(), args) |
| 198 | }), |
| 199 | } |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | impl ToPyResult for PyIterReturn { |