Skip to content

Commit ca3486c

Browse files
authored
[3.12] gh-122300: Preserve AST nodes for format specifiers with single elements (GH-122308) (#122363)
(cherry picked from commit db2d8b6)
1 parent 8205c16 commit ca3486c

File tree

4 files changed

+133
-2826
lines changed

4 files changed

+133
-2826
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)