you can pass a list,
http://www.web2py.com/book/default/chapter/06#like,-regexp,-startswith,-contains,-upper,-lowerIt works fine for a small list, but when you get past a certain number maybe a 100 or a 1000, it gives an error, same thing with belongs. I think the nesting with the parenthesis becomes very high, and the stack overflows, I suspect it is an sqlite problem?
To explain what it does, the query is part of a larger dynamic query,
x = something
y = something
z = something
queries=[] # an empty query to build a list upon
queries.append(db.mytable.myfield_1.contains(x))
queries.append(db.mytable.myfield_2.contains(y))
queries.append(db.mytable.myfield_3.contains(z))
.
.
queries.append(db.mytable.myfield_10.contains(a))