Silly/crazy problem with sqlite
Rimu Atkinson
rimuatkinson+usenet at gmail.com
Fri Nov 24 16:49:06 EST 2023
>
> 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.
PyDev console: starting.
Python 3.9.15 (main, Oct 28 2022, 17:28:38) [GCC] on linux
x = ('%' + "2023-11" + '%')
x
'%2023-11%'
x = ('%' + x + '%',)
x
('%%2023-11%%',)
x.__class__.__name__
'tuple'
More information about the Python-list
mailing list