Skip to content

Prefer yield from over yielding in a loop#1544

Merged
rolandwalker merged 1 commit intomainfrom
RW/prefer-yield-from
Feb 12, 2026
Merged

Prefer yield from over yielding in a loop#1544
rolandwalker merged 1 commit intomainfrom
RW/prefer-yield-from

Conversation

@rolandwalker
Copy link
Contributor

Description

Per https://peps.python.org/pep-0380/ this construct is supposed to be more optimizable (which makes sense). It is available since Python 3.3.

Checklist

  • I added this contribution to the changelog.md file.
  • I added my name to the AUTHORS file (or it's already there).
  • To lint and format the code, I ran
    uv run ruff check && uv run ruff format && uv run mypy --install-types .

Per https://peps.python.org/pep-0380/ this construct is supposed to be
more optimizable (which makes sense).  It is available since Python 3.3.
@rolandwalker rolandwalker self-assigned this Feb 12, 2026
Copy link
Contributor

@scottnemes scottnemes left a comment

Choose a reason for hiding this comment

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

Interesting! Verified general functionality works as expected after the change.

@rolandwalker rolandwalker merged commit ae65293 into main Feb 12, 2026
8 checks passed
@rolandwalker rolandwalker deleted the RW/prefer-yield-from branch February 12, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants