File tree 2 files changed +14
-1
lines changed
text/main/basics/simpleDataTypesAndOperations/str
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -2398,6 +2398,19 @@ @inbook{PSF2024TSTS
2398
2398
urldate = { 2024-07-25} ,
2399
2399
}
2400
2400
2401
+ @xdata {PSF2024WNIP ,
2402
+ volume = { What's New in \python} ,
2403
+ crossref = { PSF2024P3D}
2404
+ }
2405
+
2406
+ @inbook {PSF2024WNIP38FSFSDEAD ,
2407
+ title = { What's New In \python~3.8: \pglspl{fstrings} Support \pythonil{=} for Self-Documenting Expressions and Debugging} ,
2408
+ author = a_hettinger_raymond,
2409
+ xdata = { PSF2024WNIP} ,
2410
+ url = { https://docs.python.org/3/whatsnew/3.8.html#bpo-36817-whatsnew} ,
2411
+ urldate = { 2024-12-01}
2412
+ }
2413
+
2401
2414
@inbook {PTVF2007EAAS ,
2402
2415
title = { 1.1~Error, Accuracy, and Stability} ,
2403
2416
chapter = { 1~Preliminaries} ,
Original file line number Diff line number Diff line change 279
279
\pythonil {f"Single braces without expression: \{\{ and \}\} ."} simply becomes \pythonil {"Single braces without expression: \{ and \} ."}
280
280
281
281
As final example, let us look at a very cool ability of \pglspl {fstring}\pythonIdx {f-string!=}.
282
- Often, we want to print an expression together with its result.
282
+ Often, we want to print an expression together with its result~ \cite (PSF2024WNIP38FSFSDEAD) .
283
283
Earlier, we wrote \pythonil {f"\{ 5\}\ + \{ 4\}\ = \{ 5 + 4\} "} is evaluated to \pythonil {"5 + 4 = 9"}.
284
284
What we actually wanted to print was the expression \pythonil {5 + 4} together with its result.
285
285
This can be done much easier:
You can’t perform that action at this time.
0 commit comments