Comment #18 on issue 3025 by [email protected]: Piecewise evaluate=False does not work when conditions are boolean
http://code.google.com/p/sympy/issues/detail?id=3025
Well, you could argue that such non-determinism is due to an ill-defined piecewise expression. What *should* the piecewise function be if both x and y are positive?
I guess the confusion here comes from looking at a piecewise both in it's mathematical sense, where the order of the conditions is generally not considered to matter, and things like Piecewise((1, x > 0), (2, y > 0), 3) are considered ill-defined, and in the programing language sense of nested or chained if-else clauses, where the order does matter.
So maybe we should have a way to represent both? I can see how the latter could be useful, but the inability to evaluate symbolic inequalities in general would make it useless for a mathematical definition of a piecewise (because to be consistant, it should *never* evaluate unless the first non-False condition is explicitly True).
-- You received this message because you are subscribed to the Google Groups "sympy-issues" 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-issues?hl=en.
