djblets.util.functional¶
Utilities for working with functional code.
New in version 4.0.
- iterable_len(iterable: Iterable[Any]) int [source]¶
Return the length of an iterable.
This is an efficient way of counting the total number of items in an iterable.
Note that this requires that the iterable is finite in length, and does not result in an infinite loop.
New in version 4.0.
- Parameters:
iterable (
iterable
) – The iterable of which to compute the length.- Returns:
The length of the iterable.
- Return type: