You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[3.14] Docs: Improve example for itertools.batched() (GH-136775) (#136778)
Docs: Improve example for ``itertools.batched()`` (GH-136775)
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 <38643099+RafaelWO@users.noreply.github.com>
0 commit comments