aioplus.amin¶
- async aioplus.amin(aiterable, /, *, key=None, default=<object object>)¶
Return the smallest item in
aiterable.- Parameters:
aiterable (AsyncIterable[T]) – An asynchronous iterable of objects.
key (Callable[[T], SupportsRichComparison], optional) – A function that extracts a comparison key from each element in the iterable.
default (D, optional) – A default value to return if the iterable is empty.
- Returns:
The smallest item in the iterable or the default value.
- Return type:
T or D
Examples
>>> aiterable = arange(23) >>> await amin(aiterable) 0
See also