Skip to content

Commit d9c7b91

Browse files
committed
[3.12] pythongh-122300: Preserve AST nodes for format specifiers with single elements (pythonGH-122308)
(cherry picked from commit db2d8b6) Co-authored-by: Pablo Galindo Salgado <[email protected]>
1 parent 8205c16 commit d9c7b91

File tree

4 files changed

+134
-2827
lines changed

4 files changed

+134
-2827
lines changed

Doc/library/ast.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,9 @@ Literals
302302
Name(id='a', ctx=Load())],
303303
keywords=[]),
304304
conversion=-1,
305-
format_spec=Constant(value='.3'))]))
305+
format_spec=JoinedStr(
306+
values=[
307+
Constant(value='.3')]))]))
306308

307309

308310
.. class:: List(elts, ctx)

0 commit comments

Comments
 (0)