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'


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

Reply via email to