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

Skip unnecessary conditionals during interpolation #5529

Merged
merged 1 commit into from
May 22, 2024

Conversation

mal
Copy link
Member

@mal mal commented May 19, 2024

Small optimisation for the fix in 10c02a4.

We already bail early when inside parens (see code snip below), and taking the same approach with brackets allows us to short-circuit some unnecessary character checks.

elif parens:
pass

We already bail early when inside parens, and taking the same approach
with brackets allows us to short-circuit further character checks.
@renpytom renpytom merged commit 53f5445 into renpy:fix May 22, 2024
@mal mal deleted the optimise-str-interpolation branch May 22, 2024 01:20
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.

None yet

3 participants