From: Mike Bayer Date: Mon, 13 Aug 2012 23:44:54 +0000 (-0400) Subject: - hashable X-Git-Tag: rel_0_8_0b1~250 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7ce34c2b34d7122f6972eaf900ba988c19a0bb98;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - hashable --- diff --git a/lib/sqlalchemy/sql/operators.py b/lib/sqlalchemy/sql/operators.py index f851a5b003..560f723f26 100644 --- a/lib/sqlalchemy/sql/operators.py +++ b/lib/sqlalchemy/sql/operators.py @@ -180,6 +180,9 @@ class custom_op(object): return isinstance(other, custom_op) and \ other.opstring == self.opstring + def __hash__(self): + return id(self) + def __call__(self, left, right, **kw): return left.operate(self, right, **kw)