On Wed, Oct 20, 2010 at 11:28 AM, Guy Doune <cesium5...@yahoo.ca> wrote: > Hello, > I would get : > db.table.field1, db.table.field2, etc. > Inside a python instruction : > db().select(HERE) > It is web2py query actually. > > But I can't do this : > db().select( > for f in db['table'].fields: > if f not in fieldsBlackList: > db['table'][f], > ) > > Any idea?
Generator expression (http://www.python.org/dev/peps/pep-0289/ ): db().select(db['table'][f] for f in db['table'].fields if f not in fieldsBlackList) Disclaimer: Never used web2py. I'm going by syntax alone here. Cheers, Chris -- http://blog.rebertia.com -- http://mail.python.org/mailman/listinfo/python-list