syside.LazyIterator
- class LazyIterator
Bases:
typing.Generic
[T
]- at(arg0: int, /) syside.T | None
Get value at index. This is computed lazily. Returns
None
for out of bounds index.Notes:
Has complexity O(n) so should be used sparingly.
Only positive indices are allowed since size is unknown.
- __getitem__(arg0: int, /) syside.T
Get value at index, This is computed lazily. Throws
IndexError
on out of bounds.Notes:
Has complexity O(n) so should be used sparingly.
Only positive indices are allowed since size is unknown.
- for_each(arg0: Callable[[syside.T], None | bool | syside.VisitAction], /) None
Lazily visit each item in this range. Visitation is stopped on returning
False
orVisitAction.Stop
;