Skip to content

Commit 530cb6d

Browse files
committed
Fix formatting/parameters for TemplateStr/Interpolation AST nodes
1 parent 73e1222 commit 530cb6d

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

Doc/library/ast.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,8 @@ Literals
326326

327327
.. class:: TemplateStr(values)
328328

329-
A t-string, comprising a series of :class:`Interpolation` and :class:`Constant`
330-
nodes.
329+
A t-string, comprising a series of :class:`Interpolation` and :class:`Constant`
330+
nodes.
331331

332332
.. doctest::
333333

@@ -349,23 +349,23 @@ Literals
349349
Constant(value='ordinal')]))]))
350350

351351

352-
.. class:: Interpolation(value, str, int, format_spec)
352+
.. class:: Interpolation(value, str, conversion, format_spec)
353353

354-
Node representing a single interpolation field in a t-string.
354+
Node representing a single interpolation field in a t-string.
355355

356-
* ``value`` is any expression node (such as a literal, a variable, or a
357-
function call).
358-
* ``str`` is a constant containing the text of the interpolation expression.
359-
* ``conversion`` is an integer:
356+
* ``value`` is any expression node (such as a literal, a variable, or a
357+
function call).
358+
* ``str`` is a constant containing the text of the interpolation expression.
359+
* ``conversion`` is an integer:
360360

361-
* -1: no conversion
362-
* 115: ``!s`` string conversion
363-
* 114: ``!r`` repr conversion
364-
* 97: ``!a`` ascii conversion
361+
* -1: no conversion
362+
* 115: ``!s`` string conversion
363+
* 114: ``!r`` repr conversion
364+
* 97: ``!a`` ascii conversion
365365

366-
* ``format_spec`` is a :class:`JoinedStr` node representing the formatting
367-
of the value, or ``None`` if no format was specified. Both
368-
``conversion`` and ``format_spec`` can be set at the same time.
366+
* ``format_spec`` is a :class:`JoinedStr` node representing the formatting
367+
of the value, or ``None`` if no format was specified. Both
368+
``conversion`` and ``format_spec`` can be set at the same time.
369369

370370

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

0 commit comments

Comments
 (0)