You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
f'"{var:}"' adds redundant empty string literal in AST in 3.12 #106396
I'd say let's fix it both for compatibility and for consistency with things like an empty f-string, which is also a JoinedStr with an empty values array.
Activity
sunmy2019 commentedon Jul 4, 2023
First of all, it is not wrong. We do have an empty format spec string here.
Fixing it for compatibility reasons is also acceptable to me. I am 60-40 towards fixing it.
lysnikolaou commentedon Jul 4, 2023
I'd say let's fix it both for compatibility and for consistency with things like an empty f-string, which is also a
JoinedStrwith an emptyvaluesarray.pythongh-106396: Special-case empty format spec to gen empty JoinedSt…
gh-106396: Special-case empty format spec to gen empty JoinedStr node (…
pythongh-106396: Special-case empty format spec to gen empty JoinedSt…
[3.12] gh-106396: Special-case empty format spec to gen empty JoinedS…
Merge branch 'main' into modulelocals