diff options
Diffstat (limited to 'lib/sqlalchemy/sql')
| -rw-r--r-- | lib/sqlalchemy/sql/expression.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/sqlalchemy/sql/expression.py b/lib/sqlalchemy/sql/expression.py index a7cba8161..eb36558ce 100644 --- a/lib/sqlalchemy/sql/expression.py +++ b/lib/sqlalchemy/sql/expression.py @@ -2131,15 +2131,10 @@ class _BindParamClause(ColumnElement): return obj.type def compare(self, other, **kw): - """Compare this ``_BindParamClause`` to the given clause. - - Since ``compare()`` is meant to compare statement syntax, this - method returns True if the two ``_BindParamClauses`` have just - the same type. - - """ + """Compare this ``_BindParamClause`` to the given clause.""" + return isinstance(other, _BindParamClause) and \ - other.type.__class__ == self.type.__class__ and \ + self.type._compare_type_affinity(other.type) and \ self.value == other.value def __getstate__(self): |
