Skip to content

Conversation

hauntsaninja
Copy link
Contributor

@hauntsaninja hauntsaninja commented Sep 6, 2023

The core of the issue here is the fallback to repr in _str_literal_helper when we can't find a workable quote type. This works fine for single strings, but doesn't work well for joined strings (since earlier values of the joined string may have been written assuming a different quote). Therefore, in the bad case, we go back and force use of repr with a single quote for all parts of the joined string. The assert checks that repr continues to work the way we expect it to work.

@sunmy2019 sunmy2019 requested review from pablogsal and Yhg1s September 6, 2023 05:16
@pablogsal pablogsal merged commit 2184b76 into python:3.11 Sep 18, 2023
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.

4 participants