Skip to content

Misc improvements to the itertools docs #125147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 8, 2024

Conversation

rhettinger
Copy link
Contributor

@rhettinger rhettinger commented Oct 8, 2024

Visible changes:

  • Add example of using a tee-of-a-tee to preview a data stream.
  • Retire the partitions() recipe which did not follow the documented advice: "In general, if one iterator uses most or all of the data before another iterator starts, it is faster to use list() instead of tee()."

Non-visible changes:

  • Add more generous whitespacing in the internal doctests.
  • Move the two groups of repeatfunc() tests to one place.

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

@rhettinger rhettinger added docs Documentation in the Doc dir skip issue skip news needs backport to 3.13 bugs and security fixes labels Oct 8, 2024
@rhettinger rhettinger requested a review from ericvsmith October 8, 2024 18:37
Copy link
Contributor

@willingc willingc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks @rhettinger.

@rhettinger rhettinger merged commit b2a7272 into python:main Oct 8, 2024
25 checks passed
@miss-islington-app
Copy link

Thanks @rhettinger for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @rhettinger, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker b2a7272408593355c4c8e1d2ce9018cf96691bea 3.13

@rhettinger rhettinger deleted the itertool_docs_misc branch October 8, 2024 19:03
@rhettinger rhettinger added needs backport to 3.13 bugs and security fixes and removed needs backport to 3.13 bugs and security fixes labels Oct 8, 2024
@miss-islington-app
Copy link

Thanks @rhettinger for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 8, 2024
(cherry picked from commit b2a7272)

Co-authored-by: Raymond Hettinger <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Oct 8, 2024

GH-125149 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Oct 8, 2024
efimov-mikhail pushed a commit to efimov-mikhail/cpython that referenced this pull request Oct 9, 2024
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
None yet
Development

Successfully merging this pull request may close these issues.

3 participants