News for hackers. Stuff that matters.
Re:Python's new t-strings by zahlman on Monday April 21, 2025 @05:14PM (#43756560)
3. It prevents the developer from trying

  db.execute(f"QUERY WHERE name = {name}")
or

  db.execute("QUERY WHERE name = %s" % name, ())
or other ways of manually interpolating the string - because `db.execute` can flag a `TypeError` if given a string (no matter how it was constructed) rather than a `Template` instance.

There are no comments on this comment yet.