#8695: UniqueRepresentations implements __eq__ but not __ne__
------------------------------+---------------------------------------------
Reporter: hivert | Owner: hivert
Type: defect | Status: new
Priority: major | Milestone:
Component: misc | Keywords: UniqueRepresentation, equality
Author: Florent Hivert | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------------+---------------------------------------------
Python manuals says:
There are no implied relationships among the comparison operators. The
truth of x==y does not imply that x!=y is false. Accordingly, when
defining __eq__(), one should also define __ne__() so that the operators
will behave as expected.
!UniqueRepresentation fails to comply with this. As a consequence:
{{{
sage: G6 = GL(6, QQ)
sage: G6 == G6
True
sage: G6 != G6
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call
last)
...
NotImplementedError: Matrix group over Rational Field not implemented.
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8695>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.