(no title)
mikeholler | 10 months ago
db.execute(f"QUERY WHERE name = {name}")
versus db.execute(t"QUERY WHERE name = {name}")mikeholler | 10 months ago
db.execute(f"QUERY WHERE name = {name}")
versus db.execute(t"QUERY WHERE name = {name}")
notatoad|10 months ago
In order for a library to accept t-strings, they need to make a new function. Or else change the behavior and method signature of an old function, which I guess they could do but any sanely designed library doesn’t do.
Handling t-strings will require new functions to be added to libraries.
gls2ro|10 months ago
To clarify even more:
The problem is not writing by mistake t instead of f => this is what we want and then for this we implement a new function
The problem is writing f instead of t => and this will silently work I assume (not a Python dev just trying to understand the language design)
fzzzy|10 months ago
benwilber0|10 months ago