Yet another attempt to clear up wording in this section.
This commit is contained in:
parent
dda8eb22a9
commit
e2c32c47d2
13
pep-0498.txt
13
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
|
||||
==========
|
||||
|
|
Loading…
Reference in New Issue