Am 24.11.2023 um 22:49 schrieb Rimu Atkinson via Python-list:



I really can't think of a case
where the missing comma would make any sense at all.


That is pretty tricky, yes.

The comma means it's a tuple. Without the comma, it's just a string with parenthesis around it, which is a string.


Placeholders for the parameters in an SQL command for sqlite3.execute(..) must always be given as dict or sequence. Even if it's just one parameter.

Same thing with other database modules, it's given in PEP 249.

HTH
Sibylle

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to