10 ms·
t-string main use case is SQL (for instance, in psycopg¹) You can write things like that without SQL injection: t"INSERT INTO mytable (first_name, last_name
by JackSlateur 1mo ago
t-string main use case is SQL (for instance, in psycopg¹)
You can write things like that without SQL injection:
t"INSERT INTO mytable (first_name, last_name) VALUES ({first_name}, {last_name})"
This is a very pleasant feature, very useful
[1] https://www.psycopg.org/psycopg3/docs/basic/tstrings.html https://www.psycopg.org/psycopg3/docs/basic/tstrings.html