←back to thread

620 points tambourine_man | 3 comments | | HN request time: 0.606s | source
1. pragma_x ◴[] No.43750845[source]
Debate around the usefulness aside, are there any linter rules for warning about f-strings in light of this? I can easily see where mistaking one for the other would cause problems. For context, I'm thinking specifically about tools like Black and MyPy.
replies(2): >>43751430 #>>43752295 #
2. sanderjd ◴[] No.43751430[source]
This will be trivial to implement (it is just a check against the type that t-strings return), so I'm sure it will be done, if it hasn't already.
3. xixixao ◴[] No.43752295[source]
The runtime and static type of the template string is different to fstring (Template vs str). Unless you’re passing them somewhere that accepts strings, you can’t go wrong.

I actually quite like the simplicity of this design over tagged literals in JS.