aioplus.arepeat¶
- aioplus.arepeat(obj, /, *, times=None)¶
Return the same object repeatedly.
- Parameters:
obj (T) – Object.
times (int, optional) – Count.
- Returns:
Iterator.
- Return type:
AsyncIterator[T]
Notes
If
timesisNone, then the iterable will be infinite.
Examples
>>> [num async for num in arepeat(23, times=4)] [23, 23, 23, 23]
See also