Fix bin comprehensions when option is used - #15473
Merged
Merged
Conversation
sabiwara
force-pushed
the
bin-comprehension
branch
from
June 15, 2026 01:45
267e48c to
a3eecec
Compare
sabiwara
force-pushed
the
bin-comprehension
branch
from
June 15, 2026 02:40
a3eecec to
3ff2ece
Compare
Contributor
Author
|
OK, I think this is now ready to ship. |
sabiwara
force-pushed
the
bin-comprehension
branch
from
June 15, 2026 07:39
3ff2ece to
a39e91a
Compare
sabiwara
force-pushed
the
bin-comprehension
branch
from
June 15, 2026 07:39
a39e91a to
02612d3
Compare
josevalim
approved these changes
Jun 15, 2026
josevalim
left a comment
Member
There was a problem hiding this comment.
I'd perhaps add a test for nested generators and we are good to go!!! Awesome job and please backport!!
Contributor
Author
|
@josevalim is it what you had in mind by nested generators? dd490a9 |
Member
|
Yes!!!! |
sabiwara
added a commit
that referenced
this pull request
Jun 15, 2026
* Fix bin comprehensions - static size * Fix bin comprehensions - pinned var size * Fix bin comprehensions - operations * Add tests for nested generators
Contributor
Author
|
Backported ✅ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #15460
Addresses both the regression on
integerand the original inconsistency issue for variables/operations.I don't know if there is a better way to avoid having to drill down the variables.
This is the only way I found to distinguish between a variable that is available from before the comprehension or a var from the generators.