Hello!
Why does sqlors function (
https://github.com/webpy/webpy/blob/master/web/db.py#L351) return "1=2" at the end of the OR'ed list?
From the source's example:
>>> sqlors('foo = ', [1,2,3])
<sql: '(foo = 1 OR foo = 2 OR foo = 3 OR 1=2)'>
And in the code:
return SQLQuery(['('] +
sum([[left, sqlparam(x), ' OR '] for x in lst], []) +
['1=2)']
)
Why not instead make the list without the last OR?
['('] + sum([[left, sqlparam(x), ' OR '] for x in lst], [])[:-1] + [')']
Regards.