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

Method get_iter

crates/vm/src/protocol/object.rs:83–86  ·  view source on GitHub ↗

Takes an object and returns an iterator for it. This is typically a new iterator but if the argument is an iterator, this returns itself.

(&self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

81 /// This is typically a new iterator but if the argument is an iterator, this
82 /// returns itself.
83 pub fn get_iter(&self, vm: &VirtualMachine) -> PyResult<PyIter> {
84 // PyObject_GetIter
85 PyIter::try_from_object(vm, self.to_owned())
86 }
87
88 // PyObject *PyObject_GetAIter(PyObject *o)
89 pub fn get_aiter(&self, vm: &VirtualMachine) -> PyResult {

Callers 15

execute_instructionMethod · 0.80
iterate_mapping_keysMethod · 0.80
struct_sequence_iterFunction · 0.80
tupleMethod · 0.80
countMethod · 0.80
indexMethod · 0.80
extractMethod · 0.80
containsMethod · 0.80
method_output_as_listMethod · 0.80
compute_abstract_methodsFunction · 0.80
iterFunction · 0.80
slot_newMethod · 0.80

Calls 1

to_ownedMethod · 0.45

Tested by

no test coverage detected