Yes, it turned out to mess it up for my use case. It would just confuse folks using my application if And(a>2, a<3) ended up always being true when a is symbolic.
My solution was to make a derived class off And and add the methods
def __nonzero__(self):
raise TypeError("cannot determine truth value of And")
__bool__ = __nonzero__
This means, that if the And was not evaluated to a boolean (i.e., it is still an And), then it shouldn't have a truth value. It works fine, except for the following strange behavior in ipython (this is with my customized And function):
In [9]: expr=And(a>2, a<3)
In [10]: ?expr
[snip]
TypeError: cannot determine truth value of And
But, it does act as it is supposed to, so I'm fine with it for my purpose. However, I'm not what the right way would be to make such a change to the actual sympy code if folks agree this is the correct behavior. I assume one would want ?expr in ipython to work correctly. (I'm also not sure to which of the parent classes of And one should add this behavior.)
Duane