Skip to content

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jul 19, 2025

The current example batched('ABCDEFG', n=3) → ABC DEF G can confuse readers because both, the size of the tuples and the number of tuples are 3.
By using a batch size of n=2, it is clearer that the n argument refers to the size of the resulting tuples.
I.e. the new example is: batched('ABCDEFG', n=2) → AB CD EF G
(cherry picked from commit 3eecc72)

Co-authored-by: RafaelWO [email protected]


📚 Documentation preview 📚: https://cpython-previews--136779.org.readthedocs.build/

The current example `batched('ABCDEFG', n=3) → ABC DEF G` can confuse readers because both, the size of the tuples and the number of tuples are 3.
By using a batch size of n=2, it is clearer that the `n` argument refers to the size of the resulting tuples.
I.e. the new example is: `batched('ABCDEFG', n=2) → AB CD EF G`
(cherry picked from commit 3eecc72)

Co-authored-by: RafaelWO <[email protected]>
@python-cla-bot
Copy link

python-cla-bot bot commented Jul 19, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@AA-Turner AA-Turner enabled auto-merge (squash) July 19, 2025 09:30
@AA-Turner AA-Turner merged commit 96fac51 into python:3.13 Jul 19, 2025
30 of 31 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs Jul 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip issue skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants