Hacker News new | ask | show | jobs
by benselme 4402 days ago
(FooBar.foo > 123) | (FooBar.foo == None) & (FooBar.bar < 12)

No strings, and I get an actual expression object instance that I can, for example, store in a variable and reuse in any number of queries.

1 comments

Yes! Plus if you have a syntax error Python will catch it for you. Peewee works the same way.