File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
text/main/basics/simpleDataTypesAndOperations/str Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -2398,6 +2398,19 @@ @inbook{PSF2024TSTS
23982398 urldate = { 2024-07-25} ,
23992399}
24002400
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+
24012414@inbook {PTVF2007EAAS ,
24022415 title = { 1.1~Error, Accuracy, and Stability} ,
24032416 chapter = { 1~Preliminaries} ,
Original file line number Diff line number Diff line change 279279\pythonil {f"Single braces without expression: \{\{ and \}\} ."} simply becomes \pythonil {"Single braces without expression: \{ and \} ."}
280280
281281As 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) .
283283Earlier, we wrote \pythonil {f"\{ 5\}\ + \{ 4\}\ = \{ 5 + 4\} "} is evaluated to \pythonil {"5 + 4 = 9"}.
284284What we actually wanted to print was the expression \pythonil {5 + 4} together with its result.
285285This can be done much easier:
You can’t perform that action at this time.
0 commit comments