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

Method from_iterable

crates/vm/src/stdlib/itertools.rs:50–60  ·  view source on GitHub ↗
(
            cls: PyTypeRef,
            source: PyObjectRef,
            vm: &VirtualMachine,
        )

Source from the content-addressed store, hash-verified

48
49 #[pyclassmethod]
50 fn from_iterable(
51 cls: PyTypeRef,
52 source: PyObjectRef,
53 vm: &VirtualMachine,
54 ) -> PyResult<PyRef<Self>> {
55 Self {
56 source: PyRwLock::new(Some(source.get_iter(vm)?)),
57 active: PyRwLock::new(None),
58 }
59 .into_ref_with_type(vm, cls)
60 }
61
62 #[pyclassmethod]
63 fn __class_getitem__(

Callers 15

_add_slotsFunction · 0.80
_interleave_addrinfosFunction · 0.80
create_serverMethod · 0.80
elementsMethod · 0.80
hash_constructorsMethod · 0.80
test_compressMethod · 0.80
_implied_dirsMethod · 0.80

Calls 4

newFunction · 0.85
into_ref_with_typeMethod · 0.80
get_iterMethod · 0.80
SomeClass · 0.50