#9138: Categories for all rings
--------------------------+-------------------------------------------------
   Reporter:  jbandlow    |          Owner:  nthiery                            
                           
       Type:  defect      |         Status:  needs_review                       
                           
   Priority:  major       |      Milestone:  sage-4.7.2                         
                           
  Component:  categories  |       Keywords:  introspection, categories for 
rings                           
Work_issues:              |       Upstream:  N/A                                
                           
   Reviewer:              |         Author:  Simon King                         
                           
     Merged:              |   Dependencies:  sage-4.7, #11268, #11139, #9976, 
#9944, #11269, #11316, #11342
--------------------------+-------------------------------------------------

Comment(by SimonKing):

 Replying to [comment:98 vbraun]:
 > I've reviewed #11342 before reading Maarten's comment, so how about we
 can merge #11342 first and #9138 afterwards.

 Makes sense now...

 So, I'll attach a new patch here. The old patch does apply, it is just
 that one must change the expected output (namely the name of a class) in
 one test.

 > In `pbori.pyx`, can you clean up the comparison? E.g. remove
 `__richcmp__` completely and fix the `_cmp_` docstring.

 OK. Sometimes I like to keep the old code in a comment, so that one can
 see how and why things have changed. Fixing the `_cmp_` docstring is
 certainly needed.

 > In `sage/structure/element.pyx`, the following is stated:
 > {{{
 >     # For a derived Cython class, you **must** put the following in
 >     # your subclasses, in order for it to take advantage of the
 >     # above generic comparison code.
 > ...
 > Now this info might be outdated, and I admit that I don't have a good
 understanding of how comparison is supposed to be implemented in the new
 coercion model, but your `_cmp_` method  does not follow that comment.

 What you cite is for elements (and not outdated), but my code is for
 parents. I am afraid I have no reference. But I think I remember that for
 parents written in Cython one should provide a (single underscore) `_cmp_`
 method. I might ask on sage-devel, though.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9138#comment:99>
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