File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -324,6 +324,7 @@ Literals
324324 values=[
325325 Constant(value='.3')]))]))
326326
327+
327328.. class :: TemplateStr(values)
328329
329330 A t-string, comprising a series of :class: `Interpolation ` and :class: `Constant `
@@ -348,6 +349,8 @@ Literals
348349 values=[
349350 Constant(value='ordinal')]))]))
350351
352+ .. versionadded :: 3.14
353+
351354
352355.. class :: Interpolation(value, str, conversion, format_spec)
353356
@@ -367,6 +370,8 @@ Literals
367370 of the value, or ``None `` if no format was specified. Both
368371 ``conversion `` and ``format_spec `` can be set at the same time.
369372
373+ .. versionadded :: 3.14
374+
370375
371376.. class :: List(elts, ctx)
372377 Tuple(elts, ctx)
Original file line number Diff line number Diff line change @@ -1139,6 +1139,9 @@ iterations of the loop.
11391139 expression and its source text and pushes the resulting instance onto the
11401140 stack.
11411141
1142+ If no conversion or format specification is present, ``format `` is set to
1143+ ``2 ``.
1144+
11421145 If the low bit of ``format `` is set, it indicates that the interpolation
11431146 contains a format specification.
11441147
@@ -1147,11 +1150,11 @@ iterations of the loop.
11471150 (e.g. ``0 `` for no conversion, ``1 `` for ``!s ``, ``2 `` for ``!r ``, and
11481151 ``3 `` for ``!a ``)::
11491152
1153+ conversion = format >> 2
11501154 if format & 1:
11511155 format_spec = STACK.pop()
11521156 else:
11531157 format_spec = None
1154- conversion = format >> 2
11551158 expression = STACK.pop()
11561159 value = STACK.pop()
11571160 STACK.append(_build_interpolation(value, expression, conversion, format_spec))
You can’t perform that action at this time.
0 commit comments