[Sqlalchemy-tickets] Issue #3799: equal and not-equal operators should not be associative (zzzeek/s
Brought to you by:
zzzeek
From: John P. <iss...@bi...> - 2016-09-19 20:16:00
|
New issue 3799: equal and not-equal operators should not be associative https://bitbucket.org/zzzeek/sqlalchemy/issues/3799/equal-and-not-equal-operators-should-not John Passaro: Example ``` #!python from sqlalchemy import literal eq_stmt = (literal(1) == 1) == (literal(1) == 0) ne_stmt = (literal(1) != 1) != (literal(1) != 0) print eq_stmt; print ne_stmt ``` output: ``` :param_1 = :param_2 = :param_3 = :param_4 :param_1 != :param_2 != :param_3 != :param_4 ``` Expect: ``` (:param_1 = :param_2) = (:param_3 = :param_4) (:param_1 != :param_2) != (:param_3 != :param_4) ``` See PR (including test case) at https://gerrit.sqlalchemy.org/#/c/190/, and discussion on original PR at https://github.com/zzzeek/sqlalchemy/pull/308. Not high priority as far as the reporter is concerned, it is easy to work around. |