File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,9 @@ cdef class String:
87
87
True
88
88
"""
89
89
if type (other) is not type (self ):
90
- return False
90
+ if op in (Py_LT, Py_LE, Py_GT, Py_GE):
91
+ return NotImplemented
92
+ return op == Py_NE
91
93
92
94
s = repr (self )
93
95
o = repr (other)
@@ -200,7 +202,9 @@ cdef class Type:
200
202
True
201
203
"""
202
204
if type (other) is not type (self ):
203
- return False
205
+ if op in (Py_LT, Py_LE, Py_GT, Py_GE):
206
+ return NotImplemented
207
+ return op == Py_NE
204
208
205
209
s = repr (self )
206
210
o = repr (other)
@@ -364,7 +368,9 @@ cdef class CoxGroup(SageObject):
364
368
True
365
369
"""
366
370
if type (other) is not type (self ):
367
- return False
371
+ if op in (Py_LT, Py_LE, Py_GT, Py_GE):
372
+ return NotImplemented
373
+ return op == Py_NE
368
374
369
375
s_t = self .type()
370
376
o_t = other.type()
@@ -840,7 +846,9 @@ cdef class CoxGroupElement:
840
846
True
841
847
"""
842
848
if type (other) is not type (self ):
843
- return False
849
+ if op in (Py_LT, Py_LE, Py_GT, Py_GE):
850
+ return NotImplemented
851
+ return op == Py_NE
844
852
845
853
s_p = self .parent_group()
846
854
o_p = other.parent_group()
You can’t perform that action at this time.
0 commit comments