@@ -290,9 +290,9 @@ Literals
290290 * ``conversion `` is an integer:
291291
292292 * -1: no formatting
293- * 115 (``ord('s ') ``): ``!s `` string formatting
294- * 114 (``ord('r') ``): ``!r `` repr formatting
295- * 97 (``ord('a ') ``): ``!a `` ASCII formatting
293+ * 97 (``ord('a ') ``): ``!a `` :func: ` ASCII <ascii> ` formatting
294+ * 114 (``ord('r') ``): ``!r `` :func: ` repr ` formatting
295+ * 115 (``ord('s ') ``): ``!s `` :func: ` string <str> ` formatting
296296
297297 * ``format_spec `` is a :class: `JoinedStr ` node representing the formatting
298298 of the value, or ``None `` if no format was specified. Both
@@ -326,14 +326,18 @@ Literals
326326 Constant(value='.3')]))]))
327327
328328
329- .. class :: TemplateStr(values)
329+ .. class :: TemplateStr(values, / )
330330
331- A t-string, comprising a series of :class: `Interpolation ` and :class: `Constant `
332- nodes.
331+ .. versionadded :: 3.14
332+
333+ Node representing a template string literal, comprising a series of
334+ :class: `Interpolation ` and :class: `Constant ` nodes.
335+ These nodes may be any order, and do not need to be interleaved.
333336
334337 .. doctest ::
335338
336- >>> print (ast.dump(ast.parse(' t"{name} finished {place: ordinal} "' , mode = ' eval' ), indent = 4 ))
339+ >>> expr = ast.parse(' t"{name} finished {place: ordinal} "' , mode = ' eval' )
340+ >>> print (ast.dump(expr, indent = 4 ))
337341 Expression(
338342 body=TemplateStr(
339343 values=[
@@ -350,28 +354,28 @@ Literals
350354 values=[
351355 Constant(value='ordinal')]))]))
352356
353- .. versionadded :: 3.14
354-
357+ .. class :: Interpolation(value, str, conversion, format_spec=None)
355358
356- .. class :: Interpolation(value, str, conversion, format_spec)
359+ .. versionadded :: 3.14
357360
358- Node representing a single interpolation field in a t- string.
361+ Node representing a single interpolation field in a template string literal .
359362
360363 * ``value `` is any expression node (such as a literal, a variable, or a
361364 function call).
365+ This has the same meaning as ``FormattedValue.value ``.
362366 * ``str `` is a constant containing the text of the interpolation expression.
363367 * ``conversion `` is an integer:
364368
365369 * -1: no conversion
366- * 115 : ``!s `` string conversion
367- * 114: ``!r `` repr conversion
368- * 97 : ``!a `` ascii conversion
370+ * 97 (`` ord('a') ``) : ``!a `` :func: ` ASCII <ascii> ` conversion
371+ * 114 (`` ord('r') ``) : ``!r `` :func: ` repr ` conversion
372+ * 115 (`` ord('s') ``) : ``!s `` :func: ` string <str> ` conversion
369373
374+ This has the same meaning as ``FormattedValue.conversion ``.
370375 * ``format_spec `` is a :class: `JoinedStr ` node representing the formatting
371376 of the value, or ``None `` if no format was specified. Both
372377 ``conversion `` and ``format_spec `` can be set at the same time.
373-
374- .. versionadded :: 3.14
378+ This has the same meaning as ``FormattedValue.format_spec ``.
375379
376380
377381.. class :: List(elts, ctx)
0 commit comments