News for hackers. Stuff that matters.
Re:Python's new t-strings by fwip on Monday April 21, 2025 @09:49AM (#43751995)
Your linter can flag the type mismatch, and/or the function can reject f"" at runtime. This is because t"" yields a Template, not a str.

Template is also more powerful/concise in that the stringify function can handle the "formatting" args however it looks.

Note also, that there's no requirement that the template ever become a str to be used.

There are no comments on this comment yet.