Re:Formalizing Python F-Strings
by tragomaskhalos on Saturday January 14, 2023 @05:26AM
(#34379076)
The f-string annoyance that dwarfs all others is forgetting the bloody f, and the associated forehead slap when the console says "the answer to your big calculation is {answer}" (sic). Unfortunately I'm not sure there's any clever language solution to that.
[ Parent
| on HN ]
Proper syntax highlighting should solve this.
What if the compiler issued a warning if the f was missing and let you suppress the warning with an r?
Then it might as well be fstrings by default, rstrings for raw.
Good idea! If we do away with f strings entirely the problem does not occur.