Skip to content

gh-99606: consistent empty f-string bytecode #99608

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

Closed

Conversation

thatbirdguythatuknownot
Copy link
Contributor

@thatbirdguythatuknownot thatbirdguythatuknownot commented Nov 20, 2022

In compiler_joined_str(), handle empty f-strings by merging logic with the first if statement and replace all further references of asdl_seq_LEN(e->v.JoinedStr.values) with value_count.

Note on "remove redundancy": in `compiler_joined_str()`, replace all further references of `asdl_seq_LEN(e->v.JoinedStr.values)` with `value_count`.
@thatbirdguythatuknownot
Copy link
Contributor Author

thatbirdguythatuknownot commented Dec 19, 2023

Other PR (#112407) got merged.

@iritkatriel
Copy link
Member

Sorry, I didn't notice your PR before I made mine. I should have looked more carefully!

@thatbirdguythatuknownot
Copy link
Contributor Author

Sorry, I didn't notice your PR before I made mine. I should have looked more carefully!

It's alright, I think the other one is a better approach anyway. Besides, this one doesn't have tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants