4 ms·
Hah. What's interesting about this is that since it doesn't require everything to actually be converted to a string, one can implement things other than just pr
by ajb 2y ago
Hah. What's interesting about this is that since it doesn't require everything to actually be converted to a string, one can implement things other than just printing. So you could also implement interpretation, eg:
pylist = python(f"[ y*{coef} for y in {pylist} if y > {threshold}]")
- jeroenhd 2y agoIt also allow for things that will set off spidey senses in programmers everywhere despite theoretically being completely safe assuming mydb::sql() handles escaping in the format string: cursor = mydb::sql(f"UPDATE user SET password={password} WHERE user.id={userid}")
- ajb 2y agoYeah. You really want "mydb::sql" to not take a basic_string, only a basic_formatted_string, so it will not compile if the conversion actually happened somehow.