File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1308,14 +1308,14 @@ before the AST is created. It is therefore not possible to distinguish
13081308
13091309.. code-block :: python
13101310
1311- foo = 42
1312- template1 = t" {foo =}"
1313- template2 = t" foo= {foo !r }"
1314- assert template1.strings[0 ] == " foo ="
1315- assert template1.interpolations[0 ].expression == " foo "
1311+ value = 42
1312+ template1 = t" {value =}"
1313+ template2 = t" value= {value !r }"
1314+ assert template1.strings[0 ] == " value ="
1315+ assert template1.interpolations[0 ].expression == " value "
13161316 assert template1.interpolations[0 ].conversion == " r"
1317- assert template2.strings[0 ] == " foo ="
1318- assert template2.interpolations[0 ].expression == " foo "
1317+ assert template2.strings[0 ] == " value ="
1318+ assert template2.interpolations[0 ].expression == " value "
13191319 assert template2.interpolations[0 ].conversion == " r"
13201320
13211321 Finally, format specifiers in f-strings allow arbitrary nesting. In this PEP
You can’t perform that action at this time.
0 commit comments