Personally I do find the first version clearer, because it is based on general language rules.
back
1 comments
Especially if you come from other languages. a + " " + b will be clearer to devs that aren't senior python developers. the f string thing is just a marginal improvement at the cost of alienating other devs. But it's great for gatekeeping and job security.
> come from other languages
According to Wikipedia[1] the history of string formatting goes back to 1950s. Also, basically every major programming language these days implements it in some form.
[1] https://en.wikipedia.org/wiki/Printf
> senior python developers > great for gatekeeping and job security
Ah, okay, it's just a troll.
But the link you shared describes a syntax that is very different.
"%T", T t
not "{ (expr).__str__()} "
> Ah, okay, it's just a troll.If that helps you sleep at night