On Friday, January 13, 2012 8:50:30 AM UTC-5, Vikas Singhal wrote:
>
> Hi,
>
> How can I pass a list of fields to db(query).select() functions. For
> e.g cols = { field1, field2, field3 }
{} makes a dict, not a list -- you want:
cols = [field1, field2, field3]
In that case:
db(query).select(*cols)
Note, that is standard Python syntax (*args expands a list into a set of
positional arguments).
Anthony

