Skip to content

Comment on Python string literals are kinda funnyparent

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

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.