By the way, on my machine only the hashes get equal for commutative
symbols, not the ids:

In [12]: hash(A*B*C) == hash(C*A*B)
Out[12]: False

In [13]: id(A*B*C) == id(C*A*B)
Out[13]: False

In [14]: A,B,C = symbols('A B C', commutative=True)

In [15]: hash(A*B*C) == hash(C*A*B)
Out[15]: True

In [16]: id(A*B*C) == id(C*A*B)
Out[16]: False

So A*B*C and C*A*B generate different Mul instances even for
commutative symbols.

-- 
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.

Reply via email to