#17890: Remove _(rich)cmp_c_impl
-------------------------------------+-------------------------------------
Reporter: jdemeyer | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.6
Component: cython | Resolution:
Keywords: | Merged in:
Authors: Jeroen Demeyer | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/jdemeyer/ticket/17890 | 17bd067153ad40ced061147390687f514a7f7cba
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by vdelecroix):
Replying to [comment:35 jdemeyer]:
> Replying to [comment:34 vdelecroix]:
> > Call it whatever you want: `cmp(a1,a2)` (same type) calls `__cmp__`
but `cmp(a,b)` (different types) does not and use `__richcmp__` instead.
The consequence is that you might perform three times the coercion while
calling `cmp` with elements with different parents!
>
> I agree. Unfortunately this is general Python behaviour and not
something this ticket can fix.
It needs to be emphasized in the doc then. We should try hard to avoid
`cmp(x,y)`!
--
Ticket URL: <http://trac.sagemath.org/ticket/17890#comment:38>
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.