sympy/sympy — pull request #1471 by jrioux (2012-08-08 14:49:06+00:00)
Title: Different predicates should not have identical sort keys.

Before this commit:

>>> Q.bounded.sort_key()
((5, 0, 'Predicate'), (0, ()), ((1, 0, 'Number'), (0, ()), (), 1), 1)
>>> Q.bounded.sort_key() == Q.commutative.sort_key()
True

After this commit:

>>> Q.bounded.sort_key()
((5, 0, 'Predicate'), (1, ('bounded',)), ((1, 0, 'Number'), (0, ()), (), 1), 1)
>>> Q.bounded.sort_key() == Q.commutative.sort_key()
False