(iterable: ArgIterable<ArgIntoBool>, vm: &VirtualMachine)
| 45 | |
| 46 | #[pyfunction] |
| 47 | fn all(iterable: ArgIterable<ArgIntoBool>, vm: &VirtualMachine) -> PyResult<bool> { |
| 48 | for item in iterable.iter(vm)? { |
| 49 | if !item?.into_bool() { |
| 50 | return Ok(false); |
| 51 | } |
| 52 | } |
| 53 | Ok(true) |
| 54 | } |
| 55 | |
| 56 | #[pyfunction] |
| 57 | fn any(iterable: ArgIterable<ArgIntoBool>, vm: &VirtualMachine) -> PyResult<bool> { |