-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
Parts of strings that look like comments being stripped out of nested strings with debug specifier #135148
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
Comments
Yeah this is clearly wrong. cc @pablogsal @lysnikolaou |
This is actually a regression in 3.12, likely due to PEP-701:
Removing the release blocker label as it's old. |
Not just debug specifier, note the
Could this be problematic? >>> t'{" ! important information ! "}'.interpolations
(Interpolation(' ! important information ! ', '" ! important information ! "', None, ''),)
>>> t'{" # important information # "}'.interpolations
(Interpolation(' # important information # ', '"', None, ''),) |
Oof, yeah, this was probably introduced in #112284. We'll need to fix it, but the fix is not exactly straight-forward. I'll take a deeper look tomorrow. |
Not sure if this would apply in the context of the parser but worked for me before I realized it wasn't matching up.
|
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Bug description:
Is this desired behavior?
Even if they are not actually multiline:
Seems to go back to 3.12
CPython versions tested on:
3.14, CPython main branch
Operating systems tested on:
No response
Linked PRs
The text was updated successfully, but these errors were encountered: