Simplified example.

This commit is contained in:
Eric V. Smith 2015-09-22 17:57:36 -04:00
parent e7c46cdbe8
commit acf3f87883
1 changed files with 2 additions and 2 deletions

View File

@ -294,11 +294,11 @@ mechanism that ``str.format()`` uses to convert values to strings.
For example, this code::
f'abc{expr1:spec1}{expr2!r:spec2}def{expr3!s}ghi'
f'abc{expr1:spec1}{expr2!r:spec2}def{expr3}ghi'
Might be be evaluated as::
'abc' + format(expr1, spec1) + format(repr(expr2), spec2) + 'def' + format(str(expr3)) + 'ghi'
'abc' + format(expr1, spec1) + format(repr(expr2), spec2) + 'def' + format(expr3) + 'ghi'
Expression evaluation
---------------------