Yet another attempt to clear up wording in this section.

This commit is contained in:
Eric V. Smith 2015-08-29 17:45:36 -04:00
parent dda8eb22a9
commit e2c32c47d2
1 changed files with 7 additions and 6 deletions

View File

@ -650,10 +650,11 @@ having 2 expressions::
The same expression used multiple times The same expression used multiple times
--------------------------------------- ---------------------------------------
Every expression in braces in an f-string is evaluated exactly once Every expression in an f-string is evaluated exactly once for each
for each time it appears in the f-string. However, it's undefined time it appears in the f-string. However, when the same expression
which result will show up in the resulting string value. This only appears more than once in an f-string, it's undefined which result
matters for expressions with side effects. 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 For purposes of this section, two expressions are the same if they
have the exact same literal text defining them. For example, ``'{i}'`` 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 This restriction is in place in order to allow for a possible future
extension allowing translated strings, wherein the expression extension allowing translated strings, wherein the expression
substitutions would be identified by their text values as they show up substitutions would be identified by their text representations in the
between the braces. f-strings.
References References
========== ==========