Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ebonnal committed Jan 12, 2025
1 parent be654ea commit a114fc9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions streamable/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,12 +332,12 @@ def group(
- `interval` seconds have passed since the last group was yielded.
- The upstream source is exhausted.
If `by` is specified, a group will contain only elements for which `by` returns the same value (see `.groupby` for `(key, elements)` pairs).
If `by` is specified, groups will only contain elements sharing the same `by(elem)` value (see `.groupby` for `(key, elements)` pairs).
Args:
size (Optional[int], optional): The maximum number of elements per group (default: no size limit).
interval (float, optional): Yields a group if `interval` seconds have passed since the last group was yielded. (by default: no limit on the time interval between yields)
by (Optional[Callable[[T], Any]], optional): If specified, determines the group key. A group will only contain elements that share the same `by(elem)` value. (Default: does not co-group elements.)
by (Optional[Callable[[T], Any]], optional): If specified, groups will only contain elements sharing the same `by(elem)` value. (Default: does not co-group elements.)
Returns:
Stream[List[T]]: A stream of upstream elements grouped into lists.
"""
Expand Down

0 comments on commit a114fc9

Please sign in to comment.