Comment #2 on issue 2979 by asmeu...@gmail.com: > and >= are changed into < and <=
http://code.google.com/p/sympy/issues/detail?id=2979

I don't follow exactly what the direction flag would do.

I see two basic ways to fix this:

1. Keep it like it is, but keep track inside the Inequality object which way it was created by, and use that for printing (is this what you meant with the direction flag?). This would make (x > y) == (y < x) compare to True (which is not the same as x > y == y < x by the way), as we could just ignore the direction in __eq__ (though I'm not sure if this is a good idea or not).

2. Alternately, we could make two separate classes (LessThan and GreaterThan), and create properties that refer to the bigger and smaller sides (what should these be called?). Then, any algorithm that wants to be agnostic about direction can just use those. We could still keep .lhs and .rhs, in case you want to refer to a specific directional side (of course, Gt.lhs and Gt.rhs would change from what they are now, but they could be considered wrong now).

Any thoughts on which would be a cleaner solution?

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

Reply via email to