In the end, I would think that an expression like In [10]: bool(And(a>2, a<3)) Out[10]: True
should raise a TypeError, like In [11]: bool(a>2) [snip] TypeError: cannot determine truth value of a > 2 I assume so as, as there is no way to know if a is between 2 and 3. Shouldn't it have the same behavior as this form of the same condition? In [12]: a>2 and a<3 [snip] TypeError: cannot determine truth value of a > 2 On Thursday, May 14, 2015 at 8:42:27 PM UTC-5, Duane Nykamp wrote: > > I don't think this is the desired behavior. > > In [3]: a=Symbol('a') > > In [4]: bool(And(2>a, a>2)) > Out[4]: True > > > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/8f4ccbda-2b97-4456-9714-5bc9b4c55d9e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.