Skip to content

Conversation

@rhettinger
Copy link
Contributor

@rhettingerrhettinger commented May 14, 2024

  • Replace variable it with the spelled-out iterator in the rough code equivalents
  • Use yield from instead of an equivalent for-loop
  • More accurate tee() equivalent that uses only a single shared data store
  • Use contextlib.suppress() instead of equivalent try/except. (Suggested by Pochmann).

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

@rhettingerrhettinger merged commit 7a97ee5 into python:mainMay 14, 2024
@rhettingerrhettinger deleted the further_recipe_cleanups branch May 14, 2024 15:18
@rhettingerrhettinger added needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes labels May 14, 2024
@miss-islington-app
Copy link

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

@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 May 14, 2024
(cherry picked from commit 7a97ee5) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 14, 2024
(cherry picked from commit 7a97ee5) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
@bedevere-app
Copy link

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

@bedevere-appbedevere-appbot removed the needs backport to 3.12 only security fixes label May 14, 2024
@bedevere-app
Copy link

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

@bedevere-appbedevere-appbot removed the needs backport to 3.13 bugs and security fixes label May 14, 2024
@JelleZijlstraJelleZijlstra mentioned this pull request May 28, 2024
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docsDocumentation in the Doc dirskip issueskip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@rhettinger