batch_by_property

from noon import batch_by_property

Source-derived function. Host availability is not inferred from this listing. See reference scope.

batch_by_property(items: Iterable[T], property_func: Callable[[T], U]) -> list[tuple[list[T], U | None]]
ParameterKindAnnotationDefault
itemspositional or keywordIterable[T]No default
property_funcpositional or keywordCallable[[T], U]No default

Return annotation: list[tuple[list[T], U | None]]

Group adjacent user values by their callback result, retaining order.

Source declaration