Comment #4 on issue 2626 by asmeurer: Piecewise should use a different syntax for "otherwise"
http://code.google.com/p/sympy/issues/detail?id=2626
It would work nice if we could use Python 3's keyword only arguments. Then we could do Piecewise(*args, otherwise=None).
I actually prefer one of the syntaxes from comment 2 over your suggestion, as your suggestion requires putting the args all in a larger tuple, and thus is a little less convenient and readable. I see that really neither Maple's nor Mathematica's syntax is very good.
By the way, I'm not convinced that we need the ExprCondPair() object. This was invented so that we can have Basic types in .args, but I believe it was invented before Tuple(). It's rather standard to use Tuples for these things in all other SymPy functions, so I think we should just use that. ExprCondPair does nothing more than provide .expr and .cond, which could just a easily be [0] and [1].
Well, Tuples are not Expr, which is what I mean by mathematical. Could it ever make sense to have a Piecewise of Tuples?
-- You received this message because you are subscribed to the Google Groups "sympy-issues" group. To post to this group, send email to sympy-issues@googlegroups.com. To unsubscribe from this group, send email to sympy-issues+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy-issues?hl=en.