On 29 Jan 2013, at 9:42 AM, Alan Etkin <spame...@gmail.com> wrote: > A similar caveat applies to the use of | or & in queries. > > Ok, thanks for the tips Marin and Jonathan. > > I assume then that the book's example should use parenthesis for negation, > since web2py cannot change the Python operator precedence.
Yes. Instead of: rows = db((~db.person.name=='Alex') | (db.person.id>3)).select() it should read: rows = db(~(db.person.name=='Alex') | (db.person.id>3)).select() -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.