Good idea Anthony, can you send me a patch? On Monday, 28 January 2013 16:39:07 UTC-6, Anthony wrote: > > According to the Python documentation: > > If no > __cmp__()<http://docs.python.org/2/reference/datamodel.html#object.__cmp__> > , __eq__()<http://docs.python.org/2/reference/datamodel.html#object.__eq__> > or __ne__()<http://docs.python.org/2/reference/datamodel.html#object.__ne__> > operation > is defined, class instances are compared by object identity (“address”). > > The Query class doesn't define any of those operations, so object identity > will be used, hence the False value (i.e., each query is a separate object > with a separate identity). Instead, you can do: > > repr(q) == repr(q2) > > Anthony > > On Monday, January 28, 2013 5:08:05 PM UTC-5, Alan Etkin wrote: >> >> I have noticed this behavior in trunk. Is this a feature? >> >> >>> q = db.auth_user.id > 0 >> >>> q2 = db.auth_user.id > 0 >> >>> q == q2 >> False >> >> I hope I didn't post a read the manual question again, but doesn't seem >> to be documented in the DAL section. >> >> Thanks >> >
-- --- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

