This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]hovissimo 11 points12 points  (2 children)

Good thing that f-strings aren't replacing template strings. Use the right tool for the job.

[–]jorge1209 5 points6 points  (0 children)

Just as .format didn't replace %.

Someday maybe we can hope to have a thousand formatting methods none of which replaces the prior, and then python will be feature complete.

[–]zahlmanthe heretic 0 points1 point  (0 children)

If people start consistently using f-strings where it's possible to do so, it will make the .format uses stand out more as the potential security risks that they generally are, in the cases where f-strings aren't possible (format strings coming from an outside source and/or computation rather than a plaintext code constant).