Skip to content
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

Better presentation order for recipes. #116755

Merged
merged 7 commits into from
Mar 13, 2024
Merged

Conversation

rhettinger
Copy link
Contributor

@rhettinger rhettinger commented Mar 13, 2024

Move justseen() before everseen() so that it is more easily compared with all_equal() which also uses groupby(). Also, it is simpler, has weaker input preconditions, and does not require auxiliary memory.

Move iter_index() downward because it is more complex and gets interferes with the top to bottom reading flow.

Also change the polynomial_eval() example to match the previous polynomial_from_roots() example.

Minor updates to the intro text: Add another recipe to the "incubator list" and add a link for "functional style".


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

@rhettinger rhettinger added docs Documentation in the Doc dir skip issue skip news needs backport to 3.12 bug and security fixes labels Mar 13, 2024
Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

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

This is a bit more substantial change, let's also backport to 3.11, as it's more likely to cause merge conflicts in the future.

Doc/library/itertools.rst Outdated Show resolved Hide resolved
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@rhettinger
Copy link
Contributor Author

The recipes have left 3.11 behind. I stopped updating them a good while ago. Only a bug fix would be backported.

@rhettinger rhettinger merged commit 5ff012a into python:main Mar 13, 2024
23 checks passed
@miss-islington-app
Copy link

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

@rhettinger rhettinger deleted the recipe_ordering branch March 13, 2024 20:03
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 13, 2024
(cherry picked from commit 5ff012a)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
@miss-islington-app
Copy link

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

cherry_picker 5ff012a4495060fe9f53ed034c90033e7eafb780 3.11

@bedevere-app
Copy link

bedevere-app bot commented Mar 13, 2024

GH-116757 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Mar 13, 2024
@hugovk hugovk removed the needs backport to 3.11 only security fixes label Mar 13, 2024
vstinner pushed a commit to vstinner/cpython that referenced this pull request Mar 20, 2024
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 25, 2024
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 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.

None yet

2 participants