There are some discrepancies between the two classes, and I'm not exactly sure why.
- AssocOp sympifies arguments in strict mode via *_sympify* (which is anyway just a proxy for *sympify*(., strict=True) -- is it reasonable to have a separate function for doing just this?). Anyway, this is an issue when dealing with booleans: *Xor*(True, A) breaks as booleans are obviously not converted. LatticeOp uses *sympify*. - AssocOp: the *is_commutative* attribute is overridden by the combination __new__()+flatten(). Both should probably be rewritten to take commutativity (or not) into account, this should be fully backward compatible, and provide more functionality for virtually nothing. This does not happen in LatticeOp() as *_new_args_filter* rightfully assumes commutativity and does *flatten*()'s job. Notice that LatticeOp derives from AssocOp, and provides as such its *flatten*() method. Needs refactoring? Sorry for bugging you with these comments - I'm trying to understand what's going on :) -- You received this message because you are subscribed to the Google Groups "sympy" group. To view this discussion on the web visit https://groups.google.com/d/msg/sympy/-/EYNoisCY11oJ. 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.
