#17890: Remove _(rich)cmp_c_impl
-------------------------------------+-------------------------------------
       Reporter:  jdemeyer           |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.7
      Component:  cython             |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Jeroen Demeyer     |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/jdemeyer/ticket/17890            |  0d1e049f807a1c34b00cf0e58ee65cc7734d1ad1
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by jdemeyer):

 Replying to [comment:55 vdelecroix]:
 > You wrote in the doc of `_richcmp`
 > {{{
 >         If a class wants to implement rich comparison without coercion,
 >         then ``_richcmp`` should be defined (as well as ``__richcmp__``
 >         as usual).
 > }}}
 > Why not define directly `__richcmp__` in that case?

 Because rich comparison after coercion calls `_richcmp`, not
 `__richcmp__`. The only reason this works for `Integer` is that `ZZ` has
 no sub-rings: it is never the common parent of two different parents.

--
Ticket URL: <http://trac.sagemath.org/ticket/17890#comment:56>
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 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 http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to