#17890: Remove _(rich)cmp_c_impl
-------------------------------------+-------------------------------------
Reporter: jdemeyer | Owner:
Type: enhancement | Status: needs_work
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:
-------------------------------------+-------------------------------------
Changes (by vdelecroix):
* status: needs_review => needs_work
Comment:
5. For Python classes, I guess that one needs to implement `_cmp_` and/or
`_richcmp_`. This must be precised in the doc of `Element/Parent`. For
this reason, we need a `py_rich_to_bool` available at the level of Python
(as well as the operators `Py_EQ`, `Py_NE`, etc).
6. I think we should avoid implenting `__eq__`, `__ne__` because one can
do with `_richcmp_` that would take care of coercions. What do you think?
7. There should be a mention of the Python issue that `cmp(a,b)` with `a`
and `b` of different types does not call `_cmp_` (or `__cmp__`)
--
Ticket URL: <http://trac.sagemath.org/ticket/17890#comment:39>
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.