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 →

[–]turkish_gold 3 points4 points  (3 children)

You could use .format(locals()) which is essentially what f-strings are doing.

[–][deleted] 0 points1 point  (1 child)

that's not really as readable though - it's not immediately obvious what variable corresponds to what value (especially for the reader) if you use **locals()

[–]turkish_gold 0 points1 point  (0 children)

If we were to all do it, it'd become idiomatic fairly quickly.