From e2c32c47d2efa1e1f91492e5615b61d79d583ade Mon Sep 17 00:00:00 2001 From: "Eric V. Smith" Date: Sat, 29 Aug 2015 17:45:36 -0400 Subject: [PATCH] Yet another attempt to clear up wording in this section. --- pep-0498.txt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pep-0498.txt b/pep-0498.txt index f29d0a0af..8a0241a00 100644 --- a/pep-0498.txt +++ b/pep-0498.txt @@ -650,10 +650,11 @@ having 2 expressions:: The same expression used multiple times --------------------------------------- -Every expression in braces in an f-string is evaluated exactly once -for each time it appears in the f-string. However, it's undefined -which result will show up in the resulting string value. This only -matters for expressions with side effects. +Every expression in an f-string is evaluated exactly once for each +time it appears in the f-string. However, when the same expression +appears more than once in an f-string, it's undefined which result +will be used in the resulting string value. This only matters for +expressions with side effects. For purposes of this section, two expressions are the same if they have the exact same literal text defining them. For example, ``'{i}'`` @@ -685,8 +686,8 @@ makes the two expressions distinct. This restriction is in place in order to allow for a possible future extension allowing translated strings, wherein the expression -substitutions would be identified by their text values as they show up -between the braces. +substitutions would be identified by their text representations in the +f-strings. References ==========