> I actually find that latter easier to process. The parentheses and & make >> it easier to see there are two separate conditions, and the != and > are >> easier to pick out and comprehend than "is not" and ".isGreaterThan()". A >> non-programmer may have an easier time with the more English-like version >> (assuming they happen to speak English, of course), but I think it's >> reasonable to expect even novice programmers to understand the basic >> boolean operators. Whatever your opinion on the "beauty" of one over the >> other, though, surely this doesn't justify the massive undertaking of >> building an ORM, particularly since you would still have to know and use >> the underlying DAL syntax in addition anyway. >> >> Anthony >> > > Again: > There are both performance AND memory benefits to using "is not". An > object-id check is much faster that an equality check, and having the same > object referenced by different names instead of having copies of it that > need to be equality-tested, may save tons of memory. > But if you insist in using an ugly form, than in my example you may still > do that - it would work just as well - while having the same > memory-footprint benefits, just not the performance-benefits. :) >
OK, then, again: If you're talking about building queries, your point is moot -- the operations happen in the database, not Python. As for comparisons in Python, in web2py, you wouldn't be testing equality of a whole object/record -- typically it would be a scalar (e.g., the integer ID). And you wouldn't have multiple copies of records in memory either. -- --- 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.

