because the meaning of "in", "and" and "or" cannot be overloaded in python.
This expression: DB.Excel_List.id in (3,4) would always return false because the left hand side is an object and the object is not contained in the right. Because it cannot be overloaded, we canot change its meaning. Massimo On Jan 30, 10:36 am, Stef Mientki <[email protected]> wrote: > hello, > > I thought the DAL was ment to be Pythonic. > Writing a query to search for a records with some specific id, > I have to use the Pythonic "==" instead of the SQL-like "=" > > Rows = DB ( DB.Excel_List.id == 3 ).select() > > Writing a query to search for a records with some a range of id's, > I have to use the SQL-like "belongs" > Rows = DB ( DB.Excel_List.id.belongs((3,4))).select() > > instead of the Pythonic "in" > Rows = DB ( DB.Excel_List.id in (3,4) ).select() > > Why is that ? > > thanks, > Stef Mientki

