Skip to content

Issue 1029: fix batched IDE/help() docs#1031

Merged
bbayles merged 1 commit intomore-itertools:masterfrom
inventshah:fix-batched-docstr
Jul 16, 2025
Merged

Issue 1029: fix batched IDE/help() docs#1031
bbayles merged 1 commit intomore-itertools:masterfrom
inventshah:fix-batched-docstr

Conversation

@inventshah
Copy link
Copy Markdown
Contributor

Fixes #1029

  1. help(batched) in 3.13+ is useful
Help on function batched in module more_itertools.recipes:

batched(iterable, n, *, strict=False)
    Batch data into tuples of length *n*. If the number of items in
    *iterable* is not divisible by *n*:
    * The last batch will be shorter if *strict* is ``False``.
    * :exc:`ValueError` will be raised if *strict* is ``True``.

    >>> list(batched('ABCDEFG', 3))
    [('A', 'B', 'C'), ('D', 'E', 'F'), ('G',)]

    On Python 3.13 and above, this is an alias for :func:`itertools.batched`.
  1. IDE doc string is useful
image

@bbayles bbayles merged commit 8917216 into more-itertools:master Jul 16, 2025
6 checks passed
@inventshah inventshah deleted the fix-batched-docstr branch July 16, 2025 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

batched IDE/help() documentation is incomplete

2 participants