-
-
Notifications
You must be signed in to change notification settings - Fork 660
Closed
Milestone
Description
Instead of
def _cmp_(left, right)
cdef int _cmp_c_impl(left, right) except -2
we should have
cpdef int _cmp_(left, right) except -2
Analogously for _richcmp_
.
There is one important functional change: If a Python class defines both __cmp__
and _cmp_
, then formerly the coercion framework would use __cmp__
by default to implement relational operators like >=
. After this ticket, _cmp_
will be tried first, which defaults to __cmp__
.
CC: @dkrenn
Component: cython
Author: Jeroen Demeyer
Branch/Commit: 3976f2c
Reviewer: Vincent Delecroix
Issue created by migration from https://trac.sagemath.org/ticket/17890