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

Function any

crates/vm/src/stdlib/builtins.rs:57–64  ·  view source on GitHub ↗
(iterable: ArgIterable<ArgIntoBool>, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

55
56 #[pyfunction]
57 fn any(iterable: ArgIterable<ArgIntoBool>, vm: &VirtualMachine) -> PyResult<bool> {
58 for item in iterable.iter(vm)? {
59 if item?.into_bool() {
60 return Ok(true);
61 }
62 }
63 Ok(false)
64 }
65
66 #[pyfunction]
67 pub fn ascii(obj: PyObjectRef, vm: &VirtualMachine) -> PyResult<PyStrRef> {

Callers 2

traverseFunction · 0.50
is_packageMethod · 0.50

Calls 2

into_boolMethod · 0.80
iterMethod · 0.45

Tested by

no test coverage detected