On Mar 19, 2009, at 12:34 PM, jo wrote:
> > Michael Bayer wrote: >> why dont you just stick with None instead of "nn" ? then you just >> write: >> >> if v is None: >> clause.append(self.c.field != v) >> else: >> clause.append(self.c.field == v) > It could be an idea but not intuitive and unnatural > > because None = IS NOT NULL (very ugly) :-( > and null() = IS NULL well the logic you're doing above seems unnatural all by itself, that if v is NULL you want a NOT NULL. that would seem just as "unnaturual" using "null()" as "None". just make yourself a notnull = not_(null()) and problem solved. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---
