With templates:
mysql.execute(t"DELETE FROM table WHERE id={id} AND param1={param1}")
mysql.execute("DELETE FROM table WHERE id=%s AND param1=%s", [id, param1])
But yeah it does seem a bit confusing, and maybe kinda not pythonic? Not sure.
With templates:
Without templates: So one less argument to pass if we use templates.But yeah it does seem a bit confusing, and maybe kinda not pythonic? Not sure.