#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
--------------------------+-------------------------------------------------
Changes (by vbraun):
* cc: robertwb (added)
* dependencies: sage-4.7, #11268, #11139, #9976, #9944, #11269, #11316
=> sage-4.7, #11268, #11139, #9976,
#9944, #11269, #11316, #11342
Comment:
I've reviewed #11342 before reading Maarten's comment, so how about we can
merge #11342 first and #9138 afterwards.
In `pbori.pyx`, can you clean up the comparison? E.g. remove `__richcmp__`
completely and fix the `_cmp_` docstring.
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. You must also define
# either _cmp_c_impl (if your subclass is totally ordered),
# _richcmp_c_impl (if your subclass is partially ordered), or both
# (if your class has both a total order and a partial order;
# then the total order will be available with cmp(), and the partial
# order will be available with the relation operators; in this case
# you must also define __cmp__ in your subclass).
}}}
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.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9138#comment:98>
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.