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

Method into_iter

crates/vm/src/protocol/iter.rs:72–75  ·  view source on GitHub ↗

Returns an iterator over this sequence of objects.

(self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

70impl PyIter<PyObjectRef> {
71 /// Returns an iterator over this sequence of objects.
72 pub fn into_iter<U>(self, vm: &VirtualMachine) -> PyResult<PyIterIter<'_, U, PyObjectRef>> {
73 let length_hint = vm.length_hint_opt(self.as_object().to_owned())?;
74 Ok(PyIterIter::new(vm, self.0, length_hint))
75 }
76}
77
78impl From<PyIter<Self>> for PyObjectRef {

Callers 15

criterion_benchmarkFunction · 0.45
parse_optsFunction · 0.45
get_pathsFunction · 0.45
setup_dynamic_stdlibFunction · 0.45
complete_optMethod · 0.45
to_pyobjectMethod · 0.45
newMethod · 0.45
py_to_jsFunction · 0.45
object_entriesFunction · 0.45
js_to_pyFunction · 0.45
get_ca_certsMethod · 0.45

Calls 4

newFunction · 0.85
length_hint_optMethod · 0.80
to_ownedMethod · 0.45
as_objectMethod · 0.45

Tested by 2

fromMethod · 0.36
cross_chunk_push_popFunction · 0.36