summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorLysandros Nikolaou <lisandrosnik@gmail.com>2023-07-04 12:19:08 (GMT)
committerGitHub <noreply@github.com>2023-07-04 12:19:08 (GMT)
commitdfe4de203881e8d068e6fc5b8e31075841a86d25 (patch)
treead3766f442f1175ec072a8d5e5d0fbc28fa85a3f /Misc
parent8f6df5e9cbc3a1689601714192aa6ecbb23e1927 (diff)
downloadcpython-dfe4de203881e8d068e6fc5b8e31075841a86d25.zip
cpython-dfe4de203881e8d068e6fc5b8e31075841a86d25.tar.gz
cpython-dfe4de203881e8d068e6fc5b8e31075841a86d25.tar.bz2
gh-106396: Special-case empty format spec to gen empty JoinedStr node (#106401)
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Core and Builtins/2023-07-04-09-51-45.gh-issue-106396.DmYp7x.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2023-07-04-09-51-45.gh-issue-106396.DmYp7x.rst b/Misc/NEWS.d/next/Core and Builtins/2023-07-04-09-51-45.gh-issue-106396.DmYp7x.rst
new file mode 100644
index 0000000..c5767e9
--- /dev/null
+++ b/Misc/NEWS.d/next/Core and Builtins/2023-07-04-09-51-45.gh-issue-106396.DmYp7x.rst
@@ -0,0 +1,3 @@
+When the format specification of an f-string expression is empty, the parser now
+generates an empty :class:`ast.JoinedStr` node for it instead of an one-element
+:class:`ast.JoinedStr` with an empty string :class:`ast.Constant`.