[web2py] Re: Strange behavior db( ... and ... and ...) vs. db( ... or ... or ...)

2012-08-11 Thread Yarin
Massimo, could we highlight this issue in the documentation somewhere, and/or show the right way to do a compound query. There's no documentation on this stuff, it's very easy to accidentally do because won't throw a syntax error, and we almost just shipped some production code with 'and'

[web2py] Re: Strange behavior db( ... and ... and ...) vs. db( ... or ... or ...)

2012-08-11 Thread Anthony
http://web2py.com/books/default/chapter/29/6#Logical-operators Specifically: Due to Python restrictions in overloading and and or operators, these cannot be used in forming queries. The binary operators and | must be used instead. Note that these operators (unlike and and or) have higher

Re: [web2py] Re: Strange behavior db( ... and ... and ...) vs. db( ... or ... or ...)

2012-08-11 Thread Yarin Kessler
Sorry- I missed that altogether. On Sat, Aug 11, 2012 at 11:25 PM, Anthony abasta...@gmail.com wrote: http://web2py.com/books/default/chapter/29/6#Logical-operators Specifically: Due to Python restrictions in overloading and and or operators, these cannot be used in forming queries. The