#9004: __cmp__ in sage/sets/set.py doesn't do what it's supposed to do.
-----------------------+----------------------------------------------------
   Reporter:  fbissey  |       Owner:  AlexGhitza
       Type:  defect   |      Status:  new       
   Priority:  minor    |   Milestone:  sage-4.4.3
  Component:  algebra  |    Keywords:            
     Author:           |    Upstream:  N/A       
   Reviewer:           |      Merged:            
Work_issues:           |  
-----------------------+----------------------------------------------------
 According to the comments in the code:
 -----
         Compare self and right.

         If right is not a Set compare types.  If right is also a Set,
         returns comparison on the underlying objects.
 ----
 But that is not what is currently done. In the case where
 right is not a Set (more accurately a "Set_object" that's
 possibly another issue) the following is evaluated:

 {{{
 cmp(type(right), type(Set_object))
 }}}

 The correct thing would be to compare type(right) with
 the type "Set_object" [which is type(self)] not the type
 '''of''' Set_object.

 Patch to follow.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9004>
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.

Reply via email to