[Python-checkins] peps: PEP 501: remove remnants of previous iteration
nick.coghlan
python-checkins at python.org
Sun Aug 23 05:44:54 CEST 2015
https://hg.python.org/peps/rev/e43862f323d8
changeset: 5981:e43862f323d8
user: Nick Coghlan <ncoghlan at gmail.com>
date: Sun Aug 23 13:44:47 2015 +1000
summary:
PEP 501: remove remnants of previous iteration
files:
pep-0501.txt | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/pep-0501.txt b/pep-0501.txt
--- a/pep-0501.txt
+++ b/pep-0501.txt
@@ -61,7 +61,7 @@
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 @@
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 @@
>>> 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::
--
Repository URL: https://hg.python.org/peps
More information about the Python-checkins
mailing list