Yep, that looks like a bug to me.

Aaron Meurer

On Tue, Jan 20, 2015 at 5:39 PM, Duane Nykamp <[email protected]> wrote:

>  Comparisons that are undetermined depending on values of Symbols are not
> supposed to return a truth value.  E.q., the following works correctly:
>
> In [2]: bool(Eq(x,5))
> ---------------------------------------------------------------------------
> TypeError                                 Traceback (most recent call last)
>
> [snip]
>
> TypeError: cannot determine truth value of Relational
>
>
> (and similar exception for bool(Eq(x,6)), of course)
>
>
> However, shouldn't the following also return a TypeError saying it cannot
> determine a truth value?
>
>
> In [4]: bool(Or(Eq(x,5),Eq(x,6)))
> Out[4]: True
>
> In [7]: bool(And(Eq(x,5),Eq(x,6)))
> Out[7]: True
>
> It would seem this is a bug or am I missing something?
>
> Duane
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> 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/314dc79a-0962-49d6-add0-6ffae8437d4f%40googlegroups.com
> <https://groups.google.com/d/msgid/sympy/314dc79a-0962-49d6-add0-6ffae8437d4f%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/CAKgW%3D6Kdyj7MUNs4CzHyWHJG4KULEWF5SJ%3D-Ln9RXJdw6OYw0g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to