Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
zahlman
on April 21, 2025
|
parent
|
context
|
favorite
| on:
Python’s new t-strings
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.
Consider applying for YC's Summer 2026 batch! Applications are open till May 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: