PEP 501: remove remnants of previous iteration
This commit is contained in:
parent
215e3d0aee
commit
1c7e1613cb
|
@ -61,7 +61,7 @@ Proposal
|
|||
This PEP proposes the introduction of a new string prefix that declares the
|
||||
string to be an interpolation template rather than an ordinary string::
|
||||
|
||||
template = $"Substitute $names and ${expressions} at runtime"
|
||||
template = i"Substitute $names and ${expressions} at runtime"
|
||||
|
||||
This would be effectively interpreted as::
|
||||
|
||||
|
@ -227,9 +227,9 @@ The substitution field values tuple is created by evaluating the interpolated
|
|||
expressions in the exact runtime context where the interpolation expression
|
||||
appears in the source code.
|
||||
|
||||
For the following example interpolation expression::
|
||||
For the following example interpolation template::
|
||||
|
||||
str$'abc${expr1:spec1}${expr2!r:spec2}def${expr3:!s}ghi $ident $$jkl'
|
||||
i'abc${expr1:spec1}${expr2!r:spec2}def${expr3:!s}ghi $ident $$jkl'
|
||||
|
||||
the parsed fields tuple would be::
|
||||
|
||||
|
@ -295,7 +295,7 @@ same expression and used runtime field parsing::
|
|||
>>> def foo(data):
|
||||
... return data + 20
|
||||
...
|
||||
>>> str$'input=$bar, output=${foo(bar)}'
|
||||
>>> str(i'input=$bar, output=${foo(bar)}')
|
||||
'input=10, output=30'
|
||||
|
||||
Is essentially equivalent to::
|
||||
|
|
Loading…
Reference in New Issue