The primary use is in our tests. Virtually all the SymPy tests take the form

assert something == expected

And we want the "something" to be exactly the same as the expected.
But if you search the nontest code you can see it is used quite a bit
there as well.

On the other hand, outside of documentation, Eq is not used very much.
This is primarily because most operations work on expressions, not
equalities (for instance, a derivative of integral is taken on an
expression, not an equality), and those functions that do operate on
equalities, such as solve(), assume that an expression is equal to 0,
so even code that calls solve() usually does solve(a - b) instead of
solve(Eq(a, b)).

Aaron Meurer

On Wed, Aug 30, 2017 at 6:27 AM, Robert Pollak <[email protected]> wrote:
> Sorry for the self reply.
> I found that Aaron has answered this, although I think it depends very much
> on the user's work area whether "structural equality testing is used way
> more often than creation of Eq instances".
>
> --
> 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 https://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/e23a8d01-a0e8-4d9c-8025-ab9f2db97d37%40googlegroups.com.
> 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 https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6L201BCOHNPnAjW3PbYuyFEtXx3H1q_njUKRS4inur3gQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to