News for hackers. Stuff that matters.
Re:Python's new t-strings by woodrowbarlow on Monday April 21, 2025 @10:42AM (#43752558)
nitpicking:

> It's not just a one character difference, it's a different type. So `db.execute` can reject strings both statically and dynamically.

in this case, that's not actually helpful because SQL statements don't need to have parameters, so db.execute will always need to accept a string.

Re:Python's new t-strings by anamexis on Monday April 21, 2025 @11:26AM (#43753027)
You can just pass it a template with no substitutions.
Re:Python's new t-strings by masklinn on Monday April 21, 2025 @02:12PM (#43754776)
> db.execute will always need to accept a string.

No. A t-string with no placeholders is perfectly fine. You can use that even if you have no parameters.