summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/operators.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/sql/operators.py')
-rw-r--r--lib/sqlalchemy/sql/operators.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/operators.py b/lib/sqlalchemy/sql/operators.py
index 89681fa6a..f851a5b00 100644
--- a/lib/sqlalchemy/sql/operators.py
+++ b/lib/sqlalchemy/sql/operators.py
@@ -176,6 +176,10 @@ class custom_op(object):
self.opstring = opstring
self.precedence = precedence
+ def __eq__(self, other):
+ return isinstance(other, custom_op) and \
+ other.opstring == self.opstring
+
def __call__(self, left, right, **kw):
return left.operate(self, right, **kw)