> > equation == True # outputs True > equation is True # outputs False > > Why True equation is not True? > > The `Eq` function doesn't actually return `True` but returns `S.true` whose value is equal to True. Hence `is`, which does an object-comparison which results `False` as `True` and `S.true` are separate objects. But since values of `True` and `S.true` are same, use of `==` operator results `True`.
It is recommended that you use `==` for testing Boolean Equality. Aaditya M Nair -- 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/73a0e6fb-802f-47c5-acf6-ef5d1cf873e2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
