News for hackers. Stuff that matters.
Re:Python's new t-strings by gls2ro on Monday April 21, 2025 @01:55PM (#43754592)
yes but the bug is writing f instead of t and I assume f will just work.

To clarify even more:

The problem is not writing by mistake t instead of f => this is what we want and then for this we implement a new function

The problem is writing f instead of t => and this will silently work I assume (not a Python dev just trying to understand the language design)

Re:Python's new t-strings by masklinn on Monday April 21, 2025 @02:21PM (#43754870)
> The problem is writing f instead of t => and this will silently work I assume (not a Python dev just trying to understand the language design)

In the fullness of time it has no reason to. Even in the worst case scenario where you have to compose the query dynamically in a way t-strings can’t support, you can just instantiate a Template object explicitely.

Re:Python's new t-strings by notatoad on Monday April 21, 2025 @11:53PM (#43758950)
>yes but the bug is writing f instead of t and I assume f will just work

but it will not. f-strings and t-strings are not compatible types, they will not "just work". not unless somebody changes a library to make it just work. as long as nobody does that, it's not an issue.