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

Method next

crates/vm/src/protocol/iter.rs:37–52  ·  view source on GitHub ↗
(&self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

35 Self(obj)
36 }
37 pub fn next(&self, vm: &VirtualMachine) -> PyResult<PyIterReturn> {
38 let iternext = self
39 .0
40 .borrow()
41 .class()
42 .slots
43 .iternext
44 .load()
45 .ok_or_else(|| {
46 vm.new_type_error(format!(
47 "'{}' object is not an iterator",
48 self.0.borrow().class().name()
49 ))
50 })?;
51 iternext(self.0.borrow(), vm)
52 }
53
54 pub fn iter<'a, 'b, U>(
55 &'b self,

Callers 15

collection_reprFunction · 0.45
parseMethod · 0.45
pack_intoMethod · 0.45
get_executable_pathFunction · 0.45
slot_initMethod · 0.45
prep_reraise_starFunction · 0.45
readlineMethod · 0.45
py_joinMethod · 0.45
py_partitionMethod · 0.45
py_bytes_splitlinesMethod · 0.45

Calls 8

newFunction · 0.85
ok_or_elseMethod · 0.80
okMethod · 0.80
into_resultMethod · 0.80
SomeClass · 0.50
loadMethod · 0.45
classMethod · 0.45
borrowMethod · 0.45

Tested by

no test coverage detected