[−][src]Function rustpython_vm::function::single_or_tuple_any
pub fn single_or_tuple_any<T: PyValue, F: Fn(PyRef<T>) -> PyResult<bool>>(
obj: PyObjectRef,
predicate: F,
message: fn(_: &PyObjectRef) -> String,
vm: &VirtualMachine
) -> PyResult<bool>
Tests that the predicate is True on a single value, or if the value is a tuple a tuple, then test that any of the values contained within the tuples satisfies the predicate. Type parameter T specifies the type that is expected, if the input value is not of that type or a tuple of values of that type, then a TypeError is raised.