Hello, FiniteSet currently relies on Basic.sort_key, which produces the sort key by iterating .args, in the order in which they are stored. Since FiniteSet.args are obtained from an (unordered) frozenset at construction, Basic.sort_key produces different (and hence, hash-dependent) sort keys. This does sometimes influence the sorting order, and it happens exactly so in a part of the code I'm currently working on.
A dumb and obvious solution would be to sort the elements of FiniteSet.args before producing the sort key, but that sounds ugly and inefficient. However, I haven't managed to think of a better way. Do you have any ideas? Sergiu -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
