#12793: Fix __cmp__ tests in sage/combinat/root_system/type_dual.py
-----------------------------+----------------------------------------------
Reporter: jdemeyer | Owner: sage-combinat
Type: defect | Status: new
Priority: blocker | Milestone: sage-5.0
Component: combinatorics | Keywords:
Work issues: | Report Upstream: N/A
Reviewers: | Authors: Jeroen Demeyer
Merged in: | Dependencies:
Stopgaps: |
-----------------------------+----------------------------------------------
The following was added in #6588:
{{{
def __cmp__(self, other):
"""
EXAMPLES::
sage: B4 = CartanType(['B', 4])
sage: B4dual = CartanType(['B', 4]).dual()
sage: F4dual = CartanType(['F', 4]).dual()
sage: cmp(F4dual, F4dual)
0
sage: cmp(F4dual, B4dual)
1
sage: cmp(B4dual, F4dual)
-1
sage: cmp(B4dual, B4)
1
.. todo:: do we really need a cmp, or just eq?
"""
}}}
But whether `cmp()` outputs 1 or -1 is essentially arbitrary. This must
be fixed immediately.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12793>
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.