Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
zahlman
81 days ago
|
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 Fall 2025 batch! Applications are open till Aug 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: