On Mon, Nov 10, 2008 at 9:57 PM, Brian Granger <[EMAIL PROTECTED]> wrote: > > This is what I was afraid of. The problem is that the __mul__ that I > need to get rid of is on Basic, which all my classes inherit from. I > will probably just write a function that takes the flattened args of > the final Mul class and "do the right thing"
Exactly, that's the way to go, because we want to be able to manipulate with the state in this form as well: A*B*C*D*|n> and optionally convert it to the form: E*|m> So the only way is to let sympy handle the multiplication (i.e. associative but not commutative) and then apply our own function to actually simplify it. Ondrej --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
