I\'m not quite sure what I mean here, so please bear with me..
In SQLAlchemy, it appears I\'m supposed to pass an expression to filter() in certain cases. When I try to
An even more pythonic variant of Nelson's solution is to use the operator functions from the operator module in the standard library; there is no need to create your own lambdas.
>>> from operator import eq >>> def magic(left, op, right): ... return op(left, right) ... >>> magic(5, eq, 5) True