Don't use a set() for LatticeOp()'s args as the order comes
out hash dependent. Instead, use a tuple, don't sort the args,
but still remove duplicates.

We need to override __eq__ so that And(x, y) == And(y, x)
remains satisfied.

You can merge this Pull Request by running:

  git pull https://github.com/jrioux/sympy randomhash

Or you can view, comment on it, or merge it online at:

  https://github.com/sympy/sympy/pull/1401

-- Commit Summary --

* And(), Or(), etc. should be hash independent.

-- File Changes --

M sympy/core/logic.py (15)
M sympy/core/operations.py (38)
M sympy/core/tests/test_operations.py (9)
M sympy/functions/elementary/miscellaneous.py (2)
M sympy/logic/boolalg.py (23)
M sympy/logic/utilities/dimacs.py (2)
M sympy/printing/str.py (2)
M sympy/printing/tests/test_lambdarepr.py (4)
M sympy/solvers/inequalities.py (2)
M sympy/solvers/solvers.py (2)
M sympy/stats/crv_types.py (2)
M sympy/stats/frv.py (3)

-- Patch Links --

  https://github.com/sympy/sympy/pull/1401.patch
  https://github.com/sympy/sympy/pull/1401.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/sympy/sympy/pull/1401

-- 
You received this message because you are subscribed to the Google Groups 
"sympy-patches" group.
To post to this group, send email to sympy-patches@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-patches+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-patches?hl=en.

Reply via email to