aioplus.aall¶
- async aioplus.aall(aiterable, /)¶
Return
Trueif all elements of the async iterable evaluate toTrue.- Parameters:
aiterable (AsyncIterable of SupportsBool) – An asynchronous iterable of objects supporting
object.__bool__().- Returns:
Trueif all elements evaluate toTrue, or if the iterable is empty.Falseif any element evaluates toFalse.- Return type:
Examples
>>> import asyncio >>> >>> from aioplus import aall, arange >>> >>> async def main() -> None: >>> '''Run the program.''' >>> aiterable = (num > 0 async for num in arange(2304)) >>> flg = await aall(aiterable) >>> >>> if __name__ == '__main__': >>> asyncio.run(main())
Notes
Short-circuits on the first object that evaluates to
False.
See also