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

Improve all_equal() recipe #116081

Merged
merged 1 commit into from
Feb 28, 2024
Merged

Conversation

rhettinger
Copy link
Contributor

@rhettinger rhettinger commented Feb 28, 2024

  1. Add key-function to demonstrate an essential feature of groupby()
  2. Replace conjunction of next() calls with more straightforward len() / take() logic.
  3. Add more tests

📚 Documentation preview 📚: https://cpython-previews--116081.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 Feb 28, 2024
@rhettinger rhettinger merged commit 67c19e5 into python:main Feb 28, 2024
28 checks passed
@miss-islington-app
Copy link

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

@rhettinger rhettinger deleted the all_equal_recipe branch February 28, 2024 23:04
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 28, 2024
Replace conjuction of next() calls with simpler len()/take() logic. Add key function.
(cherry picked from commit 67c19e5)

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

bedevere-app bot commented Feb 28, 2024

GH-116083 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 Feb 28, 2024
woodruffw pushed a commit to woodruffw-forks/cpython that referenced this pull request Mar 4, 2024
Replace conjuction of next() calls with simpler len()/take() logic. Add key function.
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 25, 2024
Replace conjuction of next() calls with simpler len()/take() logic. Add key function.
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
Replace conjuction of next() calls with simpler len()/take() logic. Add key function.
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.

1 participant